csstools/cssdb

:has() pseudo-class is not part of the live profile

petamoriken opened this issue · 1 comments

:has() pseudo-class is not part of the live profile in specification, so current :has() example is invalid.

"example": "a:has(> img) {\n display: block;\n}",

The :has() pseudo-class takes a selector list as an argument. In the current specification :has is not marked as part of the live selector profile, which means it can not be used within stylesheets; only with functions like document.querySelector().

https://developer.mozilla.org/en-US/docs/Web/CSS/:has
https://www.w3.org/TR/selectors-4/#profiles

The example is correct again :)

At the moment Safari is implementing :has in CSS so we can now consider it "part of the live profile in specification".