feat(ui): migrate all view bodies to design tokens (F1b)
Tokenize every remaining component <style> — calculator, order tab, inspectors, tables, report sections, lobby, auth, mail, battle viewer, toasts, map overlays. A scripted pass handled the unambiguous core palette (text/bg/surface/border/accent/danger/muted), the rest were mapped to the semantic/grey tokens by role. Remaining colour literals are the documented exceptions only: the battle-scene SVG data-visualisation palette (fixed dark, like the WebGL map canvas), overlay scrims (modal / map-canvas), and directional or deliberate drop shadows. The default theme stays dark until light coherence is signed off across the views. Updates ui/docs/design-system.md (migration status + exceptions). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,16 +88,33 @@ them in sync.
|
||||
- Directional one-off drop shadows that are not part of the elevation
|
||||
scale may stay as literal `rgba(0, 0, 0, …)` (they read acceptably in
|
||||
both themes); reach for `--shadow-*` for standard elevation.
|
||||
- Overlay scrims — a translucent layer dimming the app behind a modal,
|
||||
or darkening a map/WebGL canvas so floating chrome stays readable —
|
||||
stay literal `rgba(…)`. They sit over arbitrary content, not a themed
|
||||
surface, so a surface token would be wrong; there is no `--color-scrim`
|
||||
until a third caller justifies one.
|
||||
- Data-visualisation surfaces keep a fixed palette. The battle scene
|
||||
(`battle-player/battle-scene.svelte`) is a self-contained SVG
|
||||
visualisation — like the WebGL map canvas — and stays dark in both
|
||||
themes; its only themed neighbours are the surrounding chrome
|
||||
(`battle-viewer.svelte`). Re-theming a viz surface for light is a
|
||||
dedicated design task, not a token swap.
|
||||
- Spacing-scale adoption is gradual — colour tokens are the priority;
|
||||
existing one-off paddings are migrated opportunistically, not churned
|
||||
en masse.
|
||||
|
||||
## Migration status
|
||||
|
||||
The token system and the always-visible in-game chrome (header, account
|
||||
menu, sidebar frame, tab bar, bottom tabs, shell background) reference
|
||||
tokens and switch cleanly between light and dark. The view bodies
|
||||
(calculator, inspectors, tables, lobby, auth, map overlays, battle,
|
||||
mail) are migrated incrementally; until a view is migrated its
|
||||
hard-coded colours stay dark in both themes. F1 is complete when no
|
||||
literal theme colours remain in component `<style>` blocks.
|
||||
All component `<style>` blocks reference the tokens — the chrome
|
||||
(header, account menu, sidebar, tabs, shell) and every view body
|
||||
(calculator, inspectors, tables, report, lobby, auth, map overlays,
|
||||
battle, mail, toasts). The whole app switches coherently between light
|
||||
and dark from a single token change.
|
||||
|
||||
The only remaining literal colours are the documented exceptions above:
|
||||
the battle-scene data-viz palette, the overlay scrims, and the
|
||||
directional / deliberate drop shadows.
|
||||
|
||||
The default theme is **dark** while light coherence is being verified
|
||||
across the migrated views; once the owner signs off on light, the
|
||||
default can flip to `system`.
|
||||
|
||||
Reference in New Issue
Block a user