Repository navigation
feat(web): appearance settings — color mode + full-app board themes - #58
Merged
Merged
Conversation
Light/dark/system color mode plus four full-app board themes — Signal (default), the heritage Ember, Moss, and Iris — each a light-dark() pair, so every board ships tuned day and night variants. base.css moves to a single light-dark() token set forced via color-scheme; boards are data-board token overrides that also power the live swatch previews in the new Appearance settings section. Prefs persist per device and an app.html boot script applies them before first paint. E2E covers instant apply, persistence across reload, and reset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Appearance: color mode + board themes
Theme support, but whole-hog: where Slack's single-color themes tint the sidebar, a ClickClack board retunes the entire app — rail, surfaces, ink, accents, auth screen, settings, every keycap — with a proper day and a proper night variant per board.
What you get
How
base.csscollapses the light + dark palettes into onelight-dark()token set; the media-query dark block is gone. Forcing a mode is now justcolor-scheme: light|darkviadata-color-modeon<html>— the classic duplicated-override problem never comes back.[data-board="…"]token override blocks. Scoping to the attribute (not:root) is what powers the swatch previews for free.lib/appearance.tsowns load/apply/persist (localStorage,clickclack:color-mode:v1/clickclack:board-theme:v1); an inline boot script inapp.htmlapplies stored prefs before first paint, so no flash. The settings section reads/writes the module directly — appearance is device-local, no server state, no prop drilling.Proof
Verification
pnpm test:e2e tests/e2e/appearance.spec.ts— 2 passed: forced mode applies instantly (attribute + computedcolor-scheme) and survives reload via the boot script; board switch retunes--accent, persists, and resets clean.pnpm typecheck,pnpm lint,pnpm fmt:ts:check,pnpm buildgreen; verified interactively in the browser (mode + board switching, swatch previews, no console errors).light-dark()is Baseline 2024 (Chrome 123+, Safari 17.5+, Firefox 120+), in line with the repo's use ofcolor-mix().Embedded web assets refreshed in the final build commit.