-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect statement about pseudo-elements needing to come last in a selector #32971
Comments
See spec:
So it seems that |
Yes, it turns out the MDN doc directly contradicts the spec. |
tested. invalid. The entire block fails in FF, Safari, Edge (and other chromium browsers). See https://codepen.io/estelle/pen/WNBXQNg I think we need to file a query / issue with the spec. |
It's possible that none of the browsers implement this yet. The last issue I can find is w3c/csswg-drafts#7085, which points me to https://bugzilla.mozilla.org/show_bug.cgi?id=1122965. |
So at the moment, the documentation is correct that |
It appears that allowing pseudo classes and forgiving selector lists after pseudo elements was addressed in 2022. w3c/csswg-drafts#7085 (comment) but the Even if a browser does support |
Yes. Unfortunately, this isn't the simple edit that I thought it would be. We can't just remove "not supported", we have to figure out which pseudo elements support the spec and which don't. It would also be helpful to have a timeline of intended support. Like, is it part of baseline? |
We can wait till browsers implement
|
There is some support exception for state pseudo-classes AFTER the pseudo-element. the example in I also created a codepen: In that codepen, I included an example with two selectors -- each with a pseudo-element followed by :hover -- in a selector list. The The pseudo-elements page should include a note about this, but i don't know what other exceptions are out there. |
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
What specific section or headline is this issue about?
Syntax
What information was incorrect, unhelpful, or incomplete?
This is not true for all pseudo-elements.
::part()
supports appending pseudo-classes like:hover
. This is even shown in the::part
documentation examples. I'm not sure if there are other pseudo-elements besides::part()
that support this.What did you expect to see?
At least call out any exceptions (like
::part():hover
).Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/css/pseudo-elements
The text was updated successfully, but these errors were encountered: