Skip to main content

node_establishes_stacking_context

Function node_establishes_stacking_context 

Source
pub fn node_establishes_stacking_context(
    styled_dom: &StyledDom,
    dom_id: NodeId,
) -> bool
Expand description

Standalone predicate: does this element establish a new stacking context?

Centralizes the CSS 2.1 ยง9.9.1 and CSS3 rules for stacking context creation. Checks: position + z-index, opacity < 1, transform != none.

This is the canonical check used by display list generation and can also be called from other phases that need to reason about stacking contexts.