<?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>8568</bug_id>
          
          <creation_ts>2009-12-29 10:37:13 +0000</creation_ts>
          <short_desc>CSS validator does not recognise :last-child</short_desc>
          <delta_ts>2011-10-04 20:05:48 +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>Other</component>
          <version>CSS Validator</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://jigsaw.w3.org/css-validator/validator?uri=http://www.quirksmode.org/css/firstchild.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bernhard Bodenstorfer">bbodi</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>30289</commentid>
    <comment_count>0</comment_count>
      <attachid>800</attachid>
    <who name="Bernhard Bodenstorfer">bbodi</who>
    <bug_when>2009-12-29 10:37:13 +0000</bug_when>
    <thetext>Created attachment 800
Reduced XHTML file reproducing the bug.

The stylesheet for http://www.quirksmode.org/css/firstchild.html contains the rejected rule
tr.compheader:last-child th {
	border: none;
}
Note that the :first-child pseudo class appears to work fine in the same stylesheet.

A more minimalistic show case is the attached XHTML file with embedded CSS, containing the rules:
p:first-child { color: red; }
p:last-child { color: blue; }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57802</commentid>
    <comment_count>1</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2011-10-04 20:05:48 +0000</bug_when>
    <thetext>:first-child is in CSS2, but not :last-child which is in CSS3 (and is supported)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>800</attachid>
            <date>2009-12-29 10:37:13 +0000</date>
            <delta_ts>2009-12-29 10:37:13 +0000</delta_ts>
            <desc>Reduced XHTML file reproducing the bug.</desc>
            <filename>lastchild.html</filename>
            <type>application/xhtml+xml</type>
            <size>447</size>
            <attacher name="Bernhard Bodenstorfer">bbodi</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIGh0bWwgUFVC
TElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIgImh0dHA6Ly93d3cudzMub3Jn
L1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPgo8aHRtbCB4bWxucz0iaHR0cDovL3d3
dy53My5vcmcvMTk5OS94aHRtbCIgeG1sOmxhbmc9ImVuIj4KPGhlYWQ+Cjx0aXRsZT46bGFzdC1j
aGlsZCBidWc8L3RpdGxlPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgpwOmZpcnN0LWNoaWxkIHsg
Y29sb3I6IHJlZDsgfQpwOmxhc3QtY2hpbGQgeyBjb2xvcjogYmx1ZTsgfQo8L3N0eWxlPgo8L2hl
YWQ+Cjxib2R5Pgo8cD5EZWFyIFNpcnMsPC9wPgo8cD5UaGlzIGlzIGFuIGV4YW1wbGUuPC9wPgo8
cD5Zb3VycyBzaW5jZXJlbHksICZoZWxsaXA7PC9wPgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>