design: Themes/Tokens.xaml — one place a raw value may live, guarded by DESIGN.md
Tokens.xaml carries every colour, type size, spacing step, radius and motion duration from DESIGN.md; App.xaml merges it BEFORE Controls.xaml so styles can resolve tokens. Guard (DesignTokensTests, 4 facts): the test PARSES DESIGN.md — the colour tables under "## Colour" are the contract — and fails if a documented token has no brush, if the hex disagrees, if the meter bands drift, if Tokens ever merges after Controls, or if the retired brand red #e94560 comes back as a token. Adding a colour to the standard now requires implementing it, and changing the theme without the document is caught. Inter/JetBrains Mono are declared as token families with system fallbacks; the bundled font assets are the next unit. No surface consumes tokens yet — this unit is the foundation only.
This commit is contained in:
@@ -171,7 +171,11 @@ rejected in favour of the values above.
|
||||
|
||||
## Implementation status
|
||||
|
||||
- **Not yet wired.** `Themes/Controls.xaml` still carries the legacy palette and the dozens of
|
||||
hardcoded hexes; `Themes/Tokens.xaml` lands next, then surfaces are converted one at a time.
|
||||
- Target end state: every colour, radius and spacing value resolves from `Tokens.xaml`; a guard
|
||||
test fails on any raw `#hex` outside it.
|
||||
- **`Themes/Tokens.xaml` exists and is merged first in `App.xaml`** (2026-10-30). Guard:
|
||||
`ytLive.Tests/DesignTokensTests.cs` — it parses this document and fails if a documented token has
|
||||
no brush, if a value disagrees, or if the retired `#e94560` returns as a token.
|
||||
- **Still to sweep:** `Themes/Controls.xaml` and the dozens of hardcoded hexes in XAML/C# still use
|
||||
the legacy palette. Surfaces convert one at a time; the end state is that every colour, radius and
|
||||
spacing value resolves from `Tokens.xaml` and a guard fails on any raw `#hex` outside it.
|
||||
- Fonts (Inter, JetBrains Mono) are declared as token families with system fallbacks; the bundled
|
||||
font assets land next.
|
||||
|
||||
Reference in New Issue
Block a user