Expand description
The main cascading algorithm of the style system.
Structs§
- Cascade 🔒
- Declaration 🔒
- Declaration
Iterator 🔒 - Declarations 🔒
- The set of property declarations from our rules.
- Prioritary
Declaration 🔒Position - “Prioritary” properties are properties that other properties depend on in one way or another.
Enums§
- Cascade
Mode - Whether we’re cascading for visited or unvisited styles.
- First
Line Reparenting - 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§
- Declaration
Index 🔒 - We track the index only for prioritary properties. For other properties we can just iterate.
- Declarations
ToApply 🔒Unless Overriden - 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.