Vixen
02b45cc4
csharp
public readonly record struct UtilityCandidate

One class name, taken apart.

No guide page documents this yet — the page shows what the code says about itself.

Fields and properties (9)

  • public string Original

    The class name as written, which is also the selector it emits.

  • public IReadOnlyList<string> Variants

    The hover:, md:, [&>*]: prefixes, in order.

  • public string Name

    The utility name — p, bg, flex.

  • public string Value

    Its value — 4, accent, [37px] — or empty.

  • public bool Negative

    Whether 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? Arbitrary

    The contents of […], when the value is one.

  • public float? Opacity

    The /50 suffix read as an opacity, or null.

  • public string? SlashSuffix

    The /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 Important

    Whether it ended in !.

Methods (1)

  • public UtilityCandidate(string Original, IReadOnlyList<string> Variants, string Name, string Value, bool Negative, string? Arbitrary, float? Opacity, string? SlashSuffix, bool Important)

    One class name, taken apart.

Used by (5)

  • ApplyExpanderVixen.Ui.Styling.Utilities
  • UtilityFamiliesVixen.Ui.Styling.Utilities
  • UtilityFixtureVixen.Ui.Styling.Utilities.Tests
  • UtilityGeneratorVixen.Ui.Styling.Utilities
  • UtilityParserVixen.Ui.Styling.Utilities