Web features explorer

:has()

Newly available since 2023-12-19
Tags: css Groups: CSS > Selectors

The :has() CSS functional pseudo-class matches an element if any of the selectors passed as parameters would match at least one element.

Learning resources on MDN

Browser support (view on caniuse.com)