::part() documentation gives the false impression that :last-child and friends are usable on shadow parts #38367
Labels
Content:CSS
Cascading Style Sheets docs
help wanted
If you know something about this topic, we would love your help!
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/::part
What specific section or headline is this issue about?
Description
What information was incorrect, unhelpful, or incomplete?
Emphasis mine:
The
:last-child
pseudo-class is a tree-structural pseudo-class and therefore cannot be used on::part(...)
. To clarify,foo:last-child::part(name)
works, butfoo::part(name):last-child
does not.What did you expect to see?
There should not have been a parenthetical after "local element information," much less an inaccurate one. The start of the sentence already gives an example of a selector based on local element information (
:hover
) being usable on a shadow part.Do you have any supporting links, references, or citations?
:last-child
pseudo-class is listed in MDN's "tree-structural pseudo-classes" section.:last-child
pseudo-class belongs to the tree-structural pseudo-classes category in Selectors Level 4.Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/css/_doublecolon_part
The text was updated successfully, but these errors were encountered: