Web features explorer

host-context

Limited availability
Tags: css Groups: CSS > Selectors Web Components

The :host-context() CSS pseudo-class selects the containing element of the shadow tree in which it is used if that element or an ancestor matches the provided selector.

Learning resources on MDN

Browser support