Files
DeepSeek-TUI/web/components
Hunter B d0de1646d3 feat(web): dark mode for the docs routes
Add a dark theme scoped to /docs — the reference-site minimum. A full
site-wide inversion is unsafe: several marketing surfaces are deliberately
dark (bg-ink text-paper — the hero closer, the terminal player, the LIVE
ticker badge) and a naive token swap would flip them into light blocks.

Mechanism: the surface/ink Tailwind tokens (paper, paper-deep, paper-edge,
ink, ink-soft, ink-mute) now resolve through rgb(var(--c-*) / <alpha-value>)
channels; :root carries the exact light values, so light output is
unchanged. The dark values are set only on the .docs-theme wrapper, so the
docs subtree re-themes while the shared nav and footer stay light. Default
follows prefers-color-scheme; an explicit data-theme on <html> wins.

Add an Auto/Light/Dark toggle in the date strip that persists to
localStorage and only renders on docs routes (it would be a no-op control
elsewhere). An inline pre-paint script applies the stored choice to avoid a
theme flash.

Contrast audit: hairlines, the col/double rules, the code-block border, and
inline-code border route through a --hairline var that lightens in dark;
the code panel raises to --code-bg (#17181e) above the page so it stays
distinct; the CJK seal inverts to a light stamp with dark glyph (legible);
the indigo accent is preserved. No mermaid/code blocks currently live in
the docs pages; the code surfaces are handled for when they do.

Tests: cd web && npm run lint && npm test && npm run check:facts && npm run build — all pass
2026-07-02 00:11:37 -07:00
..