web-feature: :scope (pseudo-class)

baseline logo Widely available

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.