feat(ui): visual design system — tokens + light/dark theming (F1) #26
Reference in New Issue
Block a user
Delete Branch "feature/ui-finalize-f1-tokens"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
F1 — Visual design system
Replaces ad-hoc per-component colours with a shared design-token system,
adds light/dark theming, and migrates the whole UI onto the tokens.
From
ui/PLAN-finalize.mdF1.What changed
ui/frontend/src/lib/theme/):tokens.css(dark + light palettes; spacing/radii/typography scales),
base.css(document baseline + token focus ring),
theme.svelte.ts(system/light/dark, persisted, applied via
data-theme). A pre-paintguard in
app.htmlprevents a theme flash. The theme picker is wiredinto the account menu.
<style>references tokens — thechrome (header, sidebar, tabs, shell) and all view bodies (calculator,
order tab, inspectors, tables, report sections, lobby, auth, mail,
battle viewer, toasts, map overlays). The core palette was replaced by
a scripted pass; the semantic/grey tail mapped by role.
ui/docs/design-system.md(tokens, theming, conventions,exceptions) + index entry.
Documented literal exceptions (not theme colours)
battle-scene.svelteSVG data-visualisation palette — fixed dark,like the WebGL map canvas.
Default theme
Stays dark (the current look); light/system are opt-in via the
picker. Flipping the default to
systemis a one-line follow-up.Tests
pnpm check: 0 errors / 0 warnings.pnpm test: 735 passing (incl. newtests/theme.test.ts).🤖 Generated with Claude Code