fix(ui): make .hidden work on icon SVGs (remove display:inline-block)

The .icon CSS rule had display:inline-block, which had higher source-order
priority than Tailwind's .hidden (display:none). Both have the same
specificity, but .icon was declared later in the compiled CSS, so it
overrode .hidden.

Result: both moon and sun SVGs in the theme toggle were always visible,
making them appear side-by-side (flex) or stacked (grid) instead of
swapping cleanly between light and dark mode.

Fix: remove display:inline-block from .icon. SVGs default to inline and
still respect width:1em / height:1em correctly. Now .hidden and
.dark\:block work as intended, and only one icon is visible at a time,
perfectly centered in the button.
This commit is contained in:
2026-07-28 22:48:04 +02:00
parent 17fcbd90cb
commit 9d89a2c069
2 changed files with 0 additions and 2 deletions
-1
View File
@@ -123,7 +123,6 @@
.icon {
width: 1em;
height: 1em;
display: inline-block;
vertical-align: -0.125em;
fill: currentColor;
}
-1
View File
@@ -30,7 +30,6 @@ body.modal-open {
.icon {
width: 1em;
height: 1em;
display: inline-block;
vertical-align: -0.125em;
fill: currentColor;
}