public static class ShorthandExpansionExpands the shorthands ExCSS leaves alone because they contain a var().
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The gap this closes, and how invisible it was. ExCSS expands a shorthand while parsing — border-color: #383c43 arrives as four border-*-color declarations — and everything downstream is written against that: the layout bridge reads only longhands and says so in its own remarks, and the draw list asks for border-top-color and border-top-left-radius by name. But a shorthand whose value mentions var() cannot be expanded at parse time, because what it expands to is not known until the custom property is resolved. ExCSS therefore hands it back whole, as a declaration named border-color — which nothing reads.
⚠ The symptom is silence. The declaration is present, the cascade carries it, the substitution resolves it, and it reaches a computed style under a name no consumer asks for. Every stylesheet in this repository writes border-color: var(--border), so every border in the framework was simply not drawn — no diagnostic, no missing value, nothing to notice except a control that looked flat.
Expanded at load rather than after substitution, which is where CSS puts it. The difference is the cascade: expanding afterwards would let border-top-color: red from a weaker rule beat border-color: var(--x) from a stronger one, because by then the winner has already been picked per property. Expanding here makes a var-bearing shorthand behave exactly as the same shorthand without one — which is the property worth having, and the one the tests assert against ExCSS's own output rather than against a table written here.
⚠ inset is deliberately not here. ExCSS does not know the property and passes it through whole whether or not it holds a var() — so the layout bridge reads the shorthand itself, and expanding it would be this file inventing a difference rather than removing one. Neither is flex: its one-value form means flex-grow for a number and flex-basis for a length, and which of those a var() holds is exactly what is not known yet.
Methods (2)
public static bool IsShorthand(string property)Whether this is a shorthand this can take apart.
public static bool TryExpand(string property, string value, List<KeyValuePair<string, string>> into)Takes a shorthand apart into the longhands its consumers read.
Used by (2)
- ShorthandExpansionTestsVixen.Ui.Styling.Tests
- StyleSheetLoaderVixen.Ui.Styling