:has() pseudo-class takes a selector list as an argument. In the current specification
:has is not marked as part of the snapshot selector profile, which means it can not be used within stylesheets; only with functions like
/* Selects any <a>, as long as it has an <img> element directly inside it */ /* Note that this is not supported in any browser yet */ /* It also isn't intended to work in stylesheets */ var test = document.querySelector('a:has(> img)');
|Selectors Level 4
The definition of ':has()' in that specification.
|Working Draft||Initial definition|