Function style::properties::cascade::cascade

source ·
pub fn cascade<E>(
    stylist: &Stylist,
    pseudo: Option<&PseudoElement>,
    rule_node: &StrongRuleNode,
    guards: &StylesheetGuards<'_>,
    originating_element_style: Option<&ComputedValues>,
    parent_style: Option<&ComputedValues>,
    layout_parent_style: Option<&ComputedValues>,
    first_line_reparenting: FirstLineReparenting<'_>,
    visited_rules: Option<&StrongRuleNode>,
    cascade_input_flags: ComputedValueFlags,
    rule_cache: Option<&RuleCache>,
    rule_cache_conditions: &mut RuleCacheConditions,
    element: Option<E>
) -> Arc<ComputedValues>where
    E: TElement,
Expand description

Performs the CSS cascade, computing new styles for an element from its parent style.

The arguments are:

  • device: Used to get the initial viewport and other external state.

  • rule_node: The rule node in the tree that represent the CSS rules that matched.

  • parent_style: The parent style, if applicable; if None, this is the root node.

Returns the computed values.

  • flags: Various flags.