diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 7232721f..07c3b91c 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -69,7 +69,12 @@ style guide. ## Tokens - **Colour:** only semantic tokens (`--bg --surface --card --fg --muted --accent --accent-fg --danger ---warn --success --info --border`, each with a `-fg` partner where text sits on it). Four schemes × dark +--warn --success --info --border`, each with a `-fg` partner where text sits on it), and no palette class + (`text-amber-500`: lint-refused). A score's gold is `--rating` (theme-scoped, 4.5:1 on the page and on its + own chip), never `--warn`: a score is not a warning. What sits on a picture looks the same in both themes, + because the picture does: the broadcast red `--live` under `--live-fg` (never `--danger`: "live" is not an + error), `--rating-media` on a poster's scrim, and `--media-chrome` for the always-dark player's menus + (owner decision F16). Black and white are the media scrims and their text. Four schemes × dark and light (B2): **Midnight** (blue), **Forest** (cyan), **Slate** (fuchsia), **Matrix** (moss). Each earns its place with its own hue family. Normal text ≥ 4.5:1 and a control's edge ≥ 3:1 in **every** scheme and mode. [WCAG 1.4.3, 1.4.11] The input edge token is set under Controls (A4). The ≥ 3:1 edge is the field @@ -81,8 +86,8 @@ style guide. the fill, in dark and light. A primary button must never read as a destructive one. A new scheme is measured against this before it ships (the lab's B2 tiles do the arithmetic). [WCAG 1.4.1, 1.4.3] - **Held in code:** `frontend/src/lib/theme.contract.test.ts` measures every scheme × mode in `index.css` - against the two rules above (text 4.5:1, a control edge 3:1, the status colours as text, the accent's hue - gap). A scheme or a retuned colour that breaks them does not pass the gate. + against the two rules above (text 4.5:1, a control edge 3:1, the status and rating colours as text, the accent's + hue gap), and the media colours against what they sit on. A scheme or a retuned colour that breaks them does not pass the gate. - **No per-user colour tuning.** The schemes are the only colour choice; the old floating glass tuner was retired (E28), because free tuning is exactly the drift these rules exist to stop. - **Backdrops:** one per scheme and mode (`public/backdrops/`), soft pools in the accent's family, with a @@ -361,5 +366,6 @@ Wherever there is text, the user can select it and copy it, and no click action | 2026-09-25 | Header search | A 40 glass pill with the field edge (`lg`); what sits inside it is round | 44, r16, a glass box with a faint edge | The one rounded box among pills, and its edge under 3:1; the hero search is the YouTube/Gmail pill | | 2026-09-25 | Switch row (F12) | The whole settings row toggles (`SwitchRow`; a hand-laid row points a label at the switch) | Only the 36×24 switch toggles | The iOS / Material settings row; the text was a dead click beside the control it names | | 2026-09-25 | Edges and hovers (F14) | The ≥ 3:1 edge on the field family (fields, the form trigger); labelled pills keep the faint edge and the accent-edge hover | The ≥ 3:1 edge and a state-layer hover on every control | 1.4.11 asks an edge only where nothing else identifies the control; a heavy edge on every chip and tab weighs the whole UI down | +| 2026-09-25 | Rating and live (F16) | Own tokens: `--rating` (theme-scoped gold), `--live`/`--live-fg`, `--rating-media`, `--media-chrome`; palette classes lint-refused | Map them to `--warn` / `--danger` | A gold star and a red LIVE are what the eye expects; as warn/danger they would read as a status. The old amber score was 2:1 on light | | 2026-09-24 | Chip family | One `Chip` (filter / token / tag / suggest / ghost) + `DismissibleChip`; nothing under 24; the lint rule "no raw `