Fix settings dark mode toggle double-binding and center it (#197)
topbar.js binds click handlers to every .dark-toggle, including the settings one; settings.js then also wired a delegation that re-clicked the topbar button, so each click flipped dark mode twice (net no-op). Mark buttons as wired in topbar.js and only add a fallback handler in settings.js when topbar.js did not run. CSS: center the toggle horizontally under the Settings title with auto margins, matching .settings-body padding. Closes #197
This commit is contained in:
@@ -255,7 +255,13 @@ body {
|
||||
.theme-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
|
||||
|
||||
/* #161: more breathing room between settings sections */
|
||||
#settings-dark-toggle { margin-bottom: 20px; }
|
||||
#settings-dark-toggle {
|
||||
margin-bottom: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.settings-body h3 { margin-top: 28px; }
|
||||
.settings-body .theme-grid { margin-bottom: 8px; }
|
||||
.theme-card {
|
||||
|
||||
Reference in New Issue
Block a user