fix(nav): restore reference theme toggle geometry and single binding
The top-bar theme switch was bound twice — core/theme.js attached a click handler to #theme-toggle-desktop while runtime/main.js delegated click on .toggle-theme, and both ship in main.min.js, so one press toggled twice and the button looked dead. Also realign the control with the reference: - Drop the far modifier from fa-toggle-theme so the sun/moon glyphs resolve against the Solid face at the reference weight instead of Regular. - Restore .toggle-radius .fa/.icon to the reference form (left/right 0 + auto margin only). The extra position/top/transform/size/flex block and the > i selector were overriding the shared abs-* centering rule. - Replace the per-ID bindings with one delegated listener so the floating rail, which carries no id, keeps working. - Remove dead theme.js queries for selectors no markup or stylesheet ships (#theme-toggle, #dropdown-theme-toggle, .theme-icon-moon/.theme-icon-sun, [data-action='toggle-theme'], .is-dark). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e30de6562c
commit
030baa511e
9 files changed
+19
-139
No files matched your search
@@ -274,21 +274,10 @@
|
||||
}
|
||||
/* legacy groups these with abs-* : absolute + vertical center; then pin left/right 0 */
|
||||
.toggle-radius .fa,
|
||||
.toggle-radius .icon,
|
||||
.toggle-radius > i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
.toggle-radius .icon {
|
||||
right: 0 !important;
|
||||
left: 0 !important;
|
||||
margin: auto;
|
||||
transform: translateY(-50%);
|
||||
line-height: 1;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* solid color modifiers — set --this-bg; default --this-color white */
|
||||
|
||||
Reference in new issue
Block a user