<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>9107</bug_id>
          
          <creation_ts>2010-02-21 16:28:54 +0000</creation_ts>
          <short_desc>Incorrectly reports validity for various illegal pseudo-element usages</short_desc>
          <delta_ts>2012-09-21 14:42:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>CSS 2.1</component>
          <version>CSS Validator</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="CecilWard">cecil</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>caribou</cc>
    
    <cc>info</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32488</commentid>
    <comment_count>0</comment_count>
    <who name="CecilWard">cecil</who>
    <bug_when>2010-02-21 16:28:54 +0000</bug_when>
    <thetext>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 ) :
	&quot;One pseudo-element may be appended to the last simple selector in a chain, ..&quot;

My interpretation of this is (a) I take the word &quot;appended&quot; 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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74221</commentid>
    <comment_count>1</comment_count>
    <who name="carine bournez">caribou</who>
    <bug_when>2012-09-21 14:29:59 +0000</bug_when>
    <thetext>From http://www.w3.org/TR/CSS2/selector.html#pseudo-elements :

&quot;Pseudo-classes are allowed anywhere in selectors while pseudo-elements may only be appended after the last simple selector of the selector.&quot; 

first-line is a pseudo-element, not a pseudo-class, so this is indeed a bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74223</commentid>
    <comment_count>2</comment_count>
    <who name="carine bournez">caribou</who>
    <bug_when>2012-09-21 14:42:47 +0000</bug_when>
    <thetext>*** Bug 15224 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>