Skip to main content

ancestor

Function ancestor 

Source
pub fn ancestor(
    pseudo: &str,
    options: Option<&StyleXStateOptions>,
) -> Result<String, String>
Expand description

Creates selector that observes if the given pseudo-class is active on an ancestor with the “defaultMarker”

§Arguments

  • pseudo - The pseudo selector (e.g., ‘:hover’, ‘:focus’)
  • options - Either a custom marker string or StyleXStateOptions reference

§Returns

A :where() clause for the ancestor observer