public readonly record struct UtilityCandidateOne class name, taken apart.
No guide page documents this yet — the page shows what the code says about itself.
Fields and properties (10)
public string OriginalThe class name as written, which is also the selector it emits.
public IReadOnlyList<string> VariantsThe hover:, md:, [&>*]: prefixes, in order.
public string NameThe utility name — p, bg, flex.
public string ValueIts value — 4, accent, [37px] — or empty.
public bool NegativeWhether it was written with a leading -. A property of the value rather than of the family, because -mt-4 sets exactly what mt-4 sets and differs only in sign.
public string? ArbitraryThe contents of […], when the value is one — and the value half of an arbitrary property, and the var(…) that bg-(--brand) was shorthand for.
public float? OpacityThe /50 suffix read as an opacity, or null.
public string? SlashSuffixThe /50 suffix as written. Kept as well as Opacity because the two readings of a slash are genuinely different: bg-accent/50 is half-transparent, and w-2/3 is two thirds wide, which as an opacity would be three percent. Which one a slash means is the utility's to decide, not the parser's.
public bool ImportantWhether it ended in !.
public string? PropertyThe CSS property named by an arbitrary property — the mask-type of [mask-type:luminance] — or null for every other candidate. ⚠ A separate field rather than a Name that happens to look like a property, because the two are read by different tables and confusing them is the bug. Name is a key into UtilityFamilies' registry; this is a property name to emit verbatim, and there is by construction no family for it. A candidate with a Property has an empty Name and its value in Arbitrary.
Methods (1)
public UtilityCandidate(string Original, IReadOnlyList<string> Variants, string Name, string Value, bool Negative, string? Arbitrary, float? Opacity, string? SlashSuffix, bool Important, string? Property = null)One class name, taken apart.
Used by (9)
- ApplyExpanderVixen.Ui.Styling.Utilities
- ArbitraryPropertyTestsVixen.Ui.Styling.Utilities.Tests
- ParityLedgerVixen.Ui.Styling.Utilities.Tests
- ShadowedFamilyTestsVixen.Ui.Styling.Utilities.Tests
- UtilityConsumptionProbeVixen.Ui.Styling.Utilities.Tests
- UtilityFamiliesVixen.Ui.Styling.Utilities
- UtilityFixtureVixen.Ui.Styling.Utilities.Tests
- UtilityGeneratorVixen.Ui.Styling.Utilities
- UtilityParserVixen.Ui.Styling.Utilities