Skip to content

Add light/dark theming with an OS-aware toggle - #2

Merged
kangooroux merged 1 commit into
improve/badge-colors-and-cssfrom
improve/dark-theme
Jun 18, 2026
Merged

Add light/dark theming with an OS-aware toggle#2
kangooroux merged 1 commit into
improve/badge-colors-and-cssfrom
improve/dark-theme

Conversation

@kangooroux

@kangooroux kangooroux commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Introduce a dark navy palette (cyan/sky accent) alongside the original light theme, selectable via a persistent toggle.

What

  • light-dark() tokens — every color custom property now carries both a light and dark value. :root defaults to color-scheme: light dark, so first paint follows the OS with no flash.
  • Top-right toggle — overrides the OS choice and persists it in localStorage (data-theme on <html>). ~20 lines in app.js, no CSP changes, no inline scripts.
  • --page-gradient switched via media query + data-theme (it's not a color, so it can't use light-dark()).
  • Button restyle — pill primary with a cyan→sky gradient and glow, subtle-border secondary (reset/print), cyan-outline add button, rounded remove icon. New --ui-border/--ui-hover tokens render correctly in both themes.
  • 400-level badge colors for dark; extra spacing between custom-table cards and the input textarea.

Notes

  • print.css left light (it's for paper).
  • Plain CSS only; light-dark() and :has()/color-scheme are Baseline: Widely Available.

Introduce a dark navy palette (cyan/sky accent) alongside the original
light theme, selectable via a persistent toggle.

- Define every color token as light-dark(light, dark); :root defaults to
  color-scheme: light dark so first paint follows the OS with no flash
- Add a top-right toggle that overrides the OS choice and persists it in
  localStorage (data-theme on <html>); ~20 lines in app.js, no CSP changes
- Switch --page-gradient via media query + data-theme (not a color, so it
  can't use light-dark())
- Restyle buttons: pill primary with a cyan->sky gradient and glow,
  subtle-border secondary (reset/print), cyan-outline add button,
  rounded remove icon; --ui-border/--ui-hover work in both themes
- 400-level badge colors for dark; add space between custom-table cards
  and the input textarea

print.css left light for paper.
@kangooroux
kangooroux merged commit 1c13342 into improve/badge-colors-and-css Jun 18, 2026
1 check 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.

1 participant