Skip to content

Light theme + Light/Dark/Auto toggle (fixes #26)#27

Merged
bryanroscoe merged 2 commits into
mainfrom
fix/light-mode-theming
Jun 3, 2026
Merged

Light theme + Light/Dark/Auto toggle (fixes #26)#27
bryanroscoe merged 2 commits into
mainfrom
fix/light-mode-theming

Conversation

@bryanroscoe

Copy link
Copy Markdown
Owner

Light appearance left the cards and text in dark-mode colors over a light page, making text nearly unreadable on Linux/macOS (#26).

The UI is now fully theme-aware — every hardcoded color became a semantic CSS variable with a dark value (unchanged) and a contrast-tuned light value. A header Light / Dark / Auto toggle overrides the system appearance and persists; Auto follows the OS. Verified both themes and the override render correctly via the demo screenshot harness.

Closes #26

Light appearance previously left cards and text in dark-mode colors over
a light page, making text nearly unreadable on Linux/macOS. The UI is
now fully theme-aware: every hardcoded color became a semantic CSS
variable with both a dark value (unchanged from before) and a light
value tuned for contrast. A header toggle (Light / Dark / Auto) drives a
data-theme attribute and persists to localStorage; Auto follows the OS
via prefers-color-scheme. An inline app.html script applies the saved
choice before first paint to avoid a flash.

Closes #26
Several danger buttons (Emergency Recovery, recommended.danger, the
small-action danger hovers) used a literal white text color on top of
--danger-surface. In dark mode that's white-on-dark-red (fine), but in
light mode --danger-surface is a light pink, so the white text was
nearly invisible. Added a --danger-surface-text token (white in dark —
unchanged — dark red in light) and used it for those buttons. Verified
readable in both modes via the demo harness.
@bryanroscoe bryanroscoe merged commit 727c1fe into main Jun 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Linux light mode UI text contrast difficult to read

1 participant