Light and dark themes across the site, the editor and the timeline stage
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
One set of color tokens (src/theme.css), each light-dark(light, dark), shared by the editor and the website, generalizing the landing page's dark palette (#379). The page follows prefers-color-scheme, or a System / Light / Dark choice in the footer, the account menu and the editor's header (offline file, desktop app), kept in localStorage and set on by an inline head script before the first paint: by nonce on the site's pages, by hash in the editor's, the offline file's and the desktop app's policies. Embeds follow the system or ?theme=light|dark. The stage's default drawing (axis, ticks, labels, markers, bands, arcs, halos) uses stage tokens; a timeline theme keeps its colors, on a light stage when it sets no background. Print stays light. Unit tests check WCAG AA for the token pairs and the choice's logic; a live browser test covers the main pages in both schemes, the toggle, no flash, embeds, print, no JavaScript and themed timelines. Fixes #382 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/f47099377e5e5f25a8c20563c2833b752617dfbc
Related
Open Light and dark themes across the site, the editor and the timeline stage in the timeline