Add a dark/light theme switcher to the navbar
The palette already lived in CSS custom properties, so dark mode is a token-override block in the new theme.css, applied via data-theme on the document element. A moon/sun toggle sits top right in the navbar; an explicit choice persists in localStorage, otherwise the app follows the OS preference live. An inline head script applies the theme before first paint so a dark reload never flashes light. Token hygiene sweep alongside: literal colours that broke under a dark palette (timeline chip text, color-mix against white, calendar stripes and bands, warning banners, nav background) moved into ten new tokens with light-mode values unchanged. The flip clock keeps its fixed dark look by design; the map keeps standard light tiles in both themes.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
.day-timeline { display: flex; flex-direction: column; gap: 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
|
||||
|
||||
.dt-allday { display: flex; flex-wrap: wrap; gap: 0.35rem; }
|
||||
.dt-chip { display: inline-flex; align-items: center; gap: 0.3rem; max-width: 100%; border: none; border-left: 3px solid var(--chip); border-radius: 6px; background: color-mix(in srgb, var(--chip) 16%, white); color: #334155; font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.5rem; cursor: pointer; }
|
||||
.dt-chip { display: inline-flex; align-items: center; gap: 0.3rem; max-width: 100%; border: none; border-left: 3px solid var(--chip); border-radius: 6px; background: color-mix(in srgb, var(--chip) 16%, var(--surface)); color: var(--chip-text); font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.5rem; cursor: pointer; }
|
||||
.dt-chip-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11rem; }
|
||||
|
||||
.dt-grid-wrap { position: relative; display: flex; }
|
||||
@@ -28,8 +28,8 @@
|
||||
border: none;
|
||||
border-left: 3px solid var(--chip);
|
||||
border-radius: 5px;
|
||||
background: color-mix(in srgb, var(--chip) 22%, white);
|
||||
color: #334155;
|
||||
background: color-mix(in srgb, var(--chip) 22%, var(--surface));
|
||||
color: var(--chip-text);
|
||||
font-size: 0.74rem;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
|
||||
Reference in New Issue
Block a user