Open
Description
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?
The pseudo-element must appear after all the other components in the complex or compound selector in which it appears. For example, you can select a paragraph's first line using
p::first-line
but not the first-line's children or a hovered first line. So bothp::first-line > *
andp::first-line:hover
are invalid.
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
- Folder:
en-us/web/css/pseudo-elements
- MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/css/pseudo-elements/index.md
- Last commit: ceb7507
- Document last modified: 2023-07-26T12:42:34.000Z