Description
Add dark mode support using the semantic design token system.
The application should:
- Support light and dark themes
- Respect the user's system preference by default
- Allow the user to manually switch themes
- Persist the selected theme between visits
- Apply the theme consistently across all pages and components
Dependency
Depends on the semantic Tailwind color utility refactor (#22).
Acceptance criteria
Implementation notes
Define light values in :root and override them for the dark theme:
:root {
--bg: ...;
--surface: ...;
--sunk: ...;
--hover: ...;
--border: ...;
--border-strong: ...;
--text: ...;
--muted: ...;
--faint: ...;
--accent: ...;
--accent-deep: ...;
--accent-soft: ...;
--accent-ink: ...;
}
[data-theme="dark"] {
--bg: ...;
--surface: ...;
--sunk: ...;
--hover: ...;
--border: ...;
--border-strong: ...;
--text: ...;
--muted: ...;
--faint: ...;
--accent: ...;
--accent-deep: ...;
--accent-soft: ...;
--accent-ink: ...;
}
The selected theme may be stored in localStorage.
If no explicit theme preference exists, fall back to the user's operating system preference through prefers-color-scheme.
Description
Add dark mode support using the semantic design token system.
The application should:
Dependency
Depends on the semantic Tailwind color utility refactor (#22).
Acceptance criteria
prefers-color-schemedark:utilities when semantic tokens can handle the theme changeImplementation notes
Define light values in
:rootand override them for the dark theme:The selected theme may be stored in
localStorage.If no explicit theme preference exists, fall back to the user's operating system preference through
prefers-color-scheme.