Web features explorer

:scope (pseudo-class)

Widely available since 2022-07-15
Tags: css Groups: CSS > Selectors

The :scope CSS pseudo-class matches the scoping root, for instance the element that querySelector() is called on, or the root of a DOM subtree specified with @scope.

Learning resources on MDN

Browser support