You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What information was incorrect, unhelpful, or incomplete?
Currently, MDN BCD has a single row of compat data about :has().
It would be helpful for there to instead be a much larger set of data that enumerates what arguments are supported inside of :has().
For example:
:has(:not)
:has(:first-of-type)
:has(:modal)
:has(:playing)
and there are many, many more.
Some of these are supported in certain browsers. Others are not. Right now there's not a canonical place for developers to look up what is and is not supported.
Pseudo-elements are not supported inside :has(). :has(:has( )) is not allowed. And there are other restrictions according to the standard / see CSSWG resolutions.
What browsers does this problem apply to, if applicable?
No response
What did you expect to see?
No response
Did you test this? If so, how?
No response
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
(We are working on filling in all the Safari data... the yellow cells need confirmation of our support.)
Without a matrix like this, it will be hard for web developers to know when they can use a pseudo-class inside :has(). If I kept trying to write such code, but weirdly a bunch of the time it didn't work reliably... I'd start doubting :has() in general.
:has() is great. I don't want web developers to doubt it. I want them to be able to look up a chart and see, for example "oh, :has(:lang()) only works in 1 browser, not all... ok... I won't use that then... but looking at this chart, I can see that :has() itself is reliable in other situations."
What type of issue is this?
Missing compatibility data
What information was incorrect, unhelpful, or incomplete?
Currently, MDN BCD has a single row of compat data about
:has()
.It would be helpful for there to instead be a much larger set of data that enumerates what arguments are supported inside of
:has()
.For example:
and there are many, many more.
Some of these are supported in certain browsers. Others are not. Right now there's not a canonical place for developers to look up what is and is not supported.
Pseudo-elements are not supported inside :has().
:has(:has( ))
is not allowed. And there are other restrictions according to the standard / see CSSWG resolutions.What browsers does this problem apply to, if applicable?
No response
What did you expect to see?
No response
Did you test this? If so, how?
No response
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
No response
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/:has
MDN metadata
No response
The text was updated successfully, but these errors were encountered: