Skip to main content

collect_matched_rules

Function collect_matched_rules 

Source
pub fn collect_matched_rules(
    snapshot: &DomSnapshot,
    target: NodeId,
    rule_set: &RuleSet,
    inline_style_attr: Option<&str>,
) -> Vec<MatchedRule>
Expand description

Collects every rule matching target and flags winning declarations.

inline_style_attr is the target’s raw style attribute value, taken from the same snapshot the layout was built from; pass None when the element has no attribute. target must be an element node.