Vixen
02b45cc4
csharp
public sealed class StyleResolver

Turns an element and a rule set into one ComputedStyle.

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

Remarks

Four steps, in this order and no other. Collect the candidate rules from the bucketed index and keep the ones that match. Cascade them: for each property, the declaration with the highest CascadePrecedence wins. Inherit: fill anything the cascade did not settle, from the parent for a property that inherits. Substitute var(), which happens last because a custom property can itself be inherited and could not be resolved before inheritance had run.

Then intern, so that two elements that resolved to the same thing hold the same object — and, when the sharing cache can be trusted, skip all four steps for the second one.

Fields and properties (3)

  • public int SharingHits

    How many elements got a style from the sharing cache rather than the cascade.

  • public int Cascades

    How many elements had to be cascaded.

  • public InheritedProperties Inherited

    Which properties a child gets from its parent unasked.

Methods (4)

Used by (17)

  • AnimationTestsVixen.Ui.Styling.Tests
  • BridgeFixtureVixen.Ui.Tests
  • CascadeFixtureVixen.Ui.Styling.Tests
  • CascadeOrderTestsVixen.Ui.Styling.Tests
  • CompactionTestsVixen.Ui.Styling.Tests
  • ComputedStyleTestsVixen.Ui.Styling.Tests
  • IncrementalRestyleOracleTestsVixen.Ui.Styling.Tests
  • MultipleAnimationTestsVixen.Ui.Styling.Tests
  • ShorthandExpansionTestsVixen.Ui.Styling.Tests
  • StyleEngineVixen.Ui.Styling
  • StyleSharingOracleTestsVixen.Ui.Styling.Tests
  • StyleSheetLoadingTestsVixen.Ui.Styling.Tests
  • StyleUpdaterVixen.Ui.Styling
  • ThemeAndScannerTestsVixen.Ui.Styling.Utilities.Tests
  • TransitionTestsVixen.Ui.Styling.Tests
  • UtilityFixtureVixen.Ui.Styling.Utilities.Tests
  • UtilityGenerationTestsVixen.Ui.Styling.Utilities.Tests