Module cascade

Source
Expand description

The main cascading algorithm of the style system.

Structs§

Cascade 🔒
Declaration 🔒
DeclarationIterator 🔒
Declarations 🔒
The set of property declarations from our rules.
PrioritaryDeclarationPosition 🔒
“Prioritary” properties are properties that other properties depend on in one way or another.

Enums§

CascadeMode
Whether we’re cascading for visited or unvisited styles.
FirstLineReparenting
Whether we’re resolving a style with the purposes of reparenting for ::first-line.

Functions§

apply_declarations
NOTE: This function expects the declaration with more priority to appear first.
cascade
Performs the CSS cascade, computing new styles for an element from its parent style.
cascade_rules 🔒
iter_declarations 🔒
tweak_when_ignoring_colors 🔒

Type Aliases§

DeclarationIndex 🔒
We track the index only for prioritary properties. For other properties we can just iterate.
DeclarationsToApplyUnlessOverriden 🔒
For ignored colors mode, we sometimes want to do something equivalent to “revert-or-initial”, where we revert for a given origin, but then apply a given initial value if nothing in other origins did override it.