Vixen
02b45cc4
csharp
public sealed class StyleSheetLoader

Turns stylesheet text into rules the cascade can run.

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

Remarks

ExCSS parses; this walks what it produced and decides what each piece is. Three things it has to handle that ExCSS does not:

@layer. ExCSS 4.3.2 predates cascade layers and hands the rule back unparsed, text intact — which [the spike](../../docs/plan/spikes/vcss-excss/RESULT.md) established deliberately, before this depended on it. The prelude is read here and the body is handed straight back to ExCSS, so the gap stops at this file.

@media. Evaluated at load, not at match. A game's UI surface changes size far less often than it restyles, so re-loading on a resize is cheaper than carrying a condition on every rule and testing it on every match.

Anything unsupported. Dropped with a diagnostic naming what was written, never approximated — the same rule the selector compiler follows and for the same reason.

Fields and properties (1)

  • public IReadOnlyList<SelectorDiagnostic> Diagnostics

    Everything that could not be loaded, and why.

Methods (2)

Used by (3)

  • HotReloadHostVixen.Ui.HotReload
  • StyleEngineVixen.Ui.Styling
  • StyleSheetLoadingTestsVixen.Ui.Styling.Tests