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:
@@ -1,13 +1,16 @@
|
||||
<Application x:Class="ytLive.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ytLive"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Themes/Controls.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
<Application x:Class="ytLive.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ytLive"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!-- Design tokens first: every style below resolves its colours, sizes and
|
||||
radii from them (DESIGN.md is the source of truth). -->
|
||||
<ResourceDictionary Source="Themes/Tokens.xaml"/>
|
||||
<ResourceDictionary Source="Themes/Controls.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
Reference in New Issue
Block a user