Vixen
02b45cc4
csharp
public sealed class StyleEngine

The whole styling pipeline, assembled.

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

Remarks

The parts are separate because each one is worth testing on its own — the matcher against a brute-force oracle, the cascade against CSS's own ordering rules, the sharing cache against a resolver that does not share. They are also useless separately, and every one of them needs the same four interning tables. This puts them together once.

Three name tables rather than one. Selector names, property names and value texts are different namespaces, and folding them together would make the ancestor bloom's domain include every colour in the stylesheet — a filter over a much larger set of names is a filter that rejects less.

Fields and properties (14)

Methods (7)

  • public StyleEngine()

    Creates an engine with nothing loaded.

  • public int Load(string css, StyleOrigin origin = Author, MediaContext media = default(MediaContext))

    Loads a stylesheet.

  • public void Replace(int sheet, string css)

    Replaces a loaded sheet with new text.

  • public string SheetText(int sheet)

    The text a sheet was loaded from.

  • public void Reload()

    Rebuilds the rule set from the sheets as they now read.

  • public InlineStyleId AddInlineStyle(ReadOnlySpan<Declaration> declarations)

    Records declarations written on an element itself.

  • public ComputedStyle[] ResolveAll()

    Resolves every element in the tree, parents before children.

Used by (32)

  • AnimationTestsVixen.Ui.Styling.Tests
  • BridgeFixtureVixen.Ui.Tests
  • BuildContextVixen.Ui
  • CascadeFixtureVixen.Ui.Styling.Tests
  • CascadeOrderTestsVixen.Ui.Styling.Tests
  • CompactionTestsVixen.Ui.Styling.Tests
  • CompositionTestsVixen.Ui.Tests
  • ComputedStyleTestsVixen.Ui.Styling.Tests
  • HotReloadHostVixen.Ui.HotReload
  • IncrementalDocumentTestsVixen.Ui.Tests
  • IncrementalRestyleOracleTestsVixen.Ui.Styling.Tests
  • InlineStyleTestsVixen.Ui.Tests
  • MultipleAnimationTestsVixen.Ui.Styling.Tests
  • PathTestsVixen.Ui.Tests
  • RemovalTestsVixen.Ui.Tests
  • ReparentTestsVixen.Ui.Tests
  • ScopedStyleTestsVixen.Ui.Tests
  • SelectorQueryVixen.Ui.Testing
  • ShorthandExpansionTestsVixen.Ui.Styling.Tests
  • StyleSharingOracleTestsVixen.Ui.Styling.Tests
  • StyleSheetLoadingTestsVixen.Ui.Styling.Tests
  • StyleUpdaterVixen.Ui.Styling
  • ThemeAndScannerTestsVixen.Ui.Styling.Utilities.Tests
  • TransitionTestsVixen.Ui.Styling.Tests
  • UiDocumentVixen.Ui
  • UiElementVixen.Ui
  • UiTestVixen.Ui.Testing
  • UtilityFixtureVixen.Ui.Styling.Utilities.Tests
  • UtilityGenerationTestsVixen.Ui.Styling.Utilities.Tests
  • VirtualizingGridVixen.Ui.Controls
  • VirtualizingPanelVixen.Ui.Controls
  • PreviewCodeEditorViewVixen.Editor.AssetEditors