public sealed class ThemeTokensThe design tokens every generated utility is measured in.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The whole argument for a utility system is here rather than in the generator: "accent is now teal" is one line of one file, and the editor's two hundred components follow. That is what makes this worth building instead of hand-writing CSS, and it applies more strongly to one monolithic application than it ever did to a website.
Tokens are data, deliberately — a YAML asset rather than a config script. It can be hot-reloaded, diffed, and edited by a live theme editor, none of which is true of code.
Fields and properties (11)
public const string DefaultKeyThe key a colour family uses for its unqualified form.
public Dictionary<string, string> ColorsColours, keyed by their utility suffix — surface-1, accent.
public Dictionary<string, float> RadiusCorner radii in pixels, keyed by suffix.
public Dictionary<string, string> ShadowShadows, as the box-shadow text they stand for, keyed by suffix.
public Dictionary<string, FontSizeToken> FontSizeFont sizes, keyed by suffix.
public Dictionary<string, float> FontWeightFont weights, keyed by suffix.
public Dictionary<string, float> ScreensBreakpoint widths in pixels, keyed by variant name.
public float SpacingBaseThe spacing unit. p-4 is four of these.
public DarkModeStrategy DarkModeHow a dark theme is selected.
public List<string> ContentThe globs to scan for utilities in use.
public List<string> DiagnosticsEverything that could not be read, and why.
Methods (2)
public static ThemeTokens Parse(string yaml)Reads a vixen.ui.yaml.
public bool TryGetColor(string name, out string value)Looks a colour up, allowing for the DEFAULT shade.
Used by (6)
- ApplyExpanderVixen.Ui.Styling.Utilities
- ThemeAndScannerTestsVixen.Ui.Styling.Utilities.Tests
- UtilityFamiliesVixen.Ui.Styling.Utilities
- UtilityFixtureVixen.Ui.Styling.Utilities.Tests
- UtilityGeneratorVixen.Ui.Styling.Utilities
- VariantsVixen.Ui.Styling.Utilities