public sealed class StyleValueParserTurns a declaration's text into something that can be interpolated.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
It has to accept both of two forms of the same value, which is the consequence of ADR-009 that the spike did not reach. ExCSS normalises what it can see, and it cannot see through a var(): color: red arrives already rewritten as rgb(255, 0, 0), while color: var(--c) with --c: red arrives as red, substituted afterwards by Vixen. Both are the same colour and a parser that handled only the first would work until someone used a custom property.
Results are cached by interned value id. A stylesheet says rgb(255, 0, 0) in forty places and they all intern to one id, so the parse happens once — which matters because this runs on every declaration of every animated property.
Fields and properties (1)
public SystemPalette PaletteWhat this parser resolves a CSS system colour keyword to.
Methods (4)
public StyleValueParser(NameTable values, NameTable keywords)Creates a parser.
public StyleValueParser(NameTable values, NameTable keywords, SystemPalette? palette)Creates a parser that resolves system colours against a palette.
public StyleValue Parse(int value)Parses an interned value.
public StyleValue Parse(ReadOnlySpan<char> text)Parses value text.
Used by (16)
- AnimatorVixen.Ui.Styling
- CalcTestsVixen.Ui.Styling.Tests
- ColorFunctionTestsVixen.Ui.Styling.Tests
- CompositionTestsVixen.Ui.Styling.Utilities.Tests
- DrawListBuilderVixen.Ui
- GradientReaderVixen.Ui
- LayoutStyleBuilderVixen.Ui
- StickyReaderVixen.Ui
- StyleValueTargetVixen.Fuzz
- StyleValueTestsVixen.Ui.Styling.Tests
- ThemeAndScannerTestsVixen.Ui.Styling.Utilities.Tests
- TransformReaderVixen.Ui
- TranslationReaderVixen.Ui
- UiDocumentVixen.Ui
- UtilityFamilyTestsVixen.Ui.Styling.Utilities.Tests
- WideGamutTestsVixen.Ui.Styling.Tests