This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The validator IMHO incorrectly reports validity for the following CSS 2.1 fragments (direct input entered) Case #1 : a:first-line:first-line {} Case #2 : a:first-line:lang(en) {} Case #3 : a:first-line[attr] {} Case #4 : a:first-line elem {} According to the CSS2.1 grammar in appendix G, pretty much anything goes in respect of pseudo-element placement, so if the appendix G interpretation is accepted then the validator is correct in reporting each of the above as valid. However, according to CSS2.1 section 5.2 (http://www.w3.org/TR/CSS2/selector.html#pattern-matching ) : "One pseudo-element may be appended to the last simple selector in a chain, .." My interpretation of this is (a) I take the word "appended" to mean what it says, so a pseudo-element may only be in rightmost position. I assume that (b) zero or one pseudo elements may be present, and no more, and that (c) only the rightmost simple selector may have a pseudo-element. So case #1 should fail because of my rules (a) and (b), case #2 and #3 should fail under (a), case #4 under (c).
From http://www.w3.org/TR/CSS2/selector.html#pseudo-elements : "Pseudo-classes are allowed anywhere in selectors while pseudo-elements may only be appended after the last simple selector of the selector." first-line is a pseudo-element, not a pseudo-class, so this is indeed a bug.
*** Bug 15224 has been marked as a duplicate of this bug. ***