This commit is contained in:
overcuriousity
2025-07-14 15:15:57 +02:00
parent 921abfb5b9
commit 47eb5ad72a
7 changed files with 99 additions and 21 deletions

View File

@@ -5,6 +5,7 @@
<button
class="btn-icon"
data-theme-toggle
data-current-theme="auto"
onclick="window.themeUtils.toggleTheme()"
title="Toggle theme"
>
@@ -39,12 +40,26 @@
display: none;
}
/* Default to auto icon if no attribute is set */
[data-theme-toggle] .theme-icon-auto {
display: block;
}
[data-current-theme="light"] .theme-icon-light,
[data-current-theme="dark"] .theme-icon-dark,
[data-current-theme="auto"] .theme-icon-auto {
display: block;
}
[data-current-theme="light"] .theme-icon-dark,
[data-current-theme="light"] .theme-icon-auto,
[data-current-theme="dark"] .theme-icon-light,
[data-current-theme="dark"] .theme-icon-auto,
[data-current-theme="auto"] .theme-icon-light,
[data-current-theme="auto"] .theme-icon-dark {
display: none;
}
[data-current-theme="auto"] path {
fill: currentColor;
}