<?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>5841</bug_id>
          
          <creation_ts>2008-07-08 12:29:26 +0000</creation_ts>
          <short_desc>The validator accepts invalid notation for most pseudo-class selectors and 1 pseudo-element selector</short_desc>
          <delta_ts>2009-02-26 14:00:25 +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 3</component>
          <version>CSS Validator</version>
          <rep_platform>Macintosh</rep_platform>
          <op_sys>Mac System 9.x</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://malform.no/CSS-test/pseudo-selectors.css</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leif Halvard Silli">xn--mlform-iua</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          
          
          <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>21089</commentid>
    <comment_count>0</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2008-07-08 12:29:26 +0000</bug_when>
    <thetext>(1) Pseudo-element notation requires **double** colon notation. For example: FOO::selection{}. The only exception is that single colon is permitted for the 4 pseudo-elements from CSS 2.1, namely :first-line, :first-letter, :before and :after.

Therefore, because ::selection is a new (and seemling the *only* new ) CSS 3 pseudo-element, the double colon notation is therefore required for the ::selection{} selector. And it is therefore incorrect when the Validator accepts as valid the following: 

       FOO:selection{background:lime} 

(2) LIKEWISE, pseudo-class notation always  requires a **single** colon, for example:  FOO:link{}.  

Therefore, it is incorrect when the CSS Validator stamps the following selectors as valid:

    ::link,::visited,::active,::focus,::hover,::target, ::root,::first-child,::last-child,::checked, ::enabled,::disabled,::indeterminate,:not(::link)  {}

(3) For reference: The only times the CSS validiator correctly rejects double colon notation for pseudo-class selectors, is for the following (note that all these selectors include a paranthesis):

    ::not(*),::nth-child(1),::nth-last-child(2),::nth-of-type(2),::nth-last-of-type(2){color:red;}

(4) Note that :not(::link) currently gets accepted, whereas ::not(::link) does not.

See CSS 3 about pseudo-elements: http://www.w3.org/TR/css3-selectors/#pseudo-elements</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21090</commentid>
    <comment_count>1</comment_count>
      <attachid>560</attachid>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2008-07-08 12:34:37 +0000</bug_when>
    <thetext>Created attachment 560
Test case. Same content as the URL I am pointing to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23949</commentid>
    <comment_count>2</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2009-02-26 08:16:27 +0000</bug_when>
    <thetext>Although I am not entirely happy yet with the function parsing part, the validator is at least reporting the right errors, the handling of : and :: pseudo selectors was indeed wrong.
Fixed on http://qa-dev.w3.org:8001/css-validator/</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>560</attachid>
            <date>2008-07-08 12:34:37 +0000</date>
            <delta_ts>2008-07-08 12:34:37 +0000</delta_ts>
            <desc>Test case. Same content as the URL I am pointing to.</desc>
            <filename>pseudo-selectors.css</filename>
            <type>text/css</type>
            <size>1751</size>
            <attacher name="Leif Halvard Silli">xn--mlform-iua</attacher>
            
              <data encoding="base64">LyogCioqIDEgKiogVGhlIENTUyBWYWxpZGF0b3IgSU5DT1JSRUNUTFkgYWNjZXB0cyA6OnBzZXVk
by1lbGVtZW50IG5vdGF0aW9uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3Ig
dGhlIGZvbGxvd2luZyBwc2V1ZG8tY2xhc3NlcyAuLi4gKi8KICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICA6OmxpbmssCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOjpyb290LAogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgOjplbXB0eQogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgOjpmb2N1cywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDo6aG92ZXIsCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgIDo6YWN0aXZlLAogICAgICAgICAgICAgICAgICAgICAgICAgICA6
OnRhcmdldCwKICAgICAgICAgICAgICAgICAgICAgICAgICA6OmNoZWNrZWQsCiAgICAgICAgICAg
ICAgICAgICAgICAgICAgOjplbmFibGVkLAogICAgICAgICAgICAgICAgICAgICAgICAgIDo6dmlz
aXRlZCwKICAgICAgICAgICAgICAgICAgICAgICAgIDo6ZGlzYWJsZWQsCiAgICAgICAgICAgICAg
ICAgICAgICAgOjpsYXN0LWNoaWxkLAogICAgICAgICAgICAgICAgICAgICAgIDo6b25seS1jaGls
ZCwKICAgICAgICAgICAgICAgICAgICAgICA6bm90KDo6bGluayksIC8qIFtOb3RlOiBJdCBkb2Vz
IG5vdCBhY2NlcHQgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Om5v
dCgpLCBvbmx5IDpub3QoOjpsaW5rKSBdKi8KICAgICAgICAgICAgICAgICAgICAgIDo6Zmlyc3Qt
Y2hpbGQsCiAgICAgICAgICAgICAgICAgICAgIDo6bGFzdC1vZi10eXBlLAogICAgICAgICAgICAg
ICAgICAgICA6Om9ubHktb2YtdHlwZSwKICAgICAgICAgICAgICAgICAgICA6OmZpcnN0LW9mLXR5
cGUsCiAgICAgICAgICAgICAgICAgICAgOjppbmRldGVybWluYXRlIHtjb2xvcjpyZWQ7fQoKICAg
ICAgICAvKiAuLi4gd2hpbGUgaXQgQ09SUkVDVExZIHJlamVjdHMgOjpwc2V1ZG8tZWxlbWVudCBu
b3RhdGlvbiBmb3IKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIHRo
ZSBmb2xsb3dpbmcgcHNldWRvLWNsYXNzZXM6ICAqLwogICAgICAgICAgICAgICAgICAgICAgICAg
ICA6Om5vdChwKSwKICAgICAgICAgICAgICAgICAgICAgOjpudGgtY2hpbGQoMSksCiAgICAgICAg
ICAgICAgICA6Om50aC1sYXN0LWNoaWxkKDIpLAogICAgICAgICAgICAgICAgICAgOjpudGgtb2Yt
dHlwZSgyKSwKICAgICAgICAgICAgICA6Om50aC1sYXN0LW9mLXR5cGUoMil7Y29sb3I6cmVkO30K
LyogCioqIDIgKiogVGhlIENTUyBWYWxpZGlhdG9yIElOQ09SUkVDVExZIGFjY2VwdHMgOnBzZXVk
by1jbGFzcyBub3RhdGlvbiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciB0aGUg
cHNldWRvLWVsZW1lbnQgOjpzZWxlY3Rpb24gLi4uICAqLwogICAgICAgICAgICAgICAgICAgICAg
ICAgOnNlbGVjdGlvbntjb2xvcjpyZWR9CiAgICAgIC8qIFRoZSBmYWN0IHRoYXQgLi4uICovIAog
ICAgICAgICAgICAgIDpiZWZvcmUsIDphZnRlciwgOmZpcnN0LWxldHRlciwgOmZpcnN0LWxpbmUg
e2NvbG9yOnJlZDt9CiAgICAgLyogLi4uIGdldHMgYWNjZXB0ZWQsIGlzIGJ5IHNwZWNpYWwgcGVy
bWlzc2lvbiBzaW5jZSB0aGVzZSBhcmUgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICB2YWxpZCBDU1MgMi4xLiBzZWxlY3RvcnMuICovCgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>