W3C home > Mailing lists > Public > www-style@w3.org > February 2005

Re: [CSS3] nth-child pseudo class

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 7 Feb 2005 14:03:01 +0000 (UTC)
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.61.0502071359130.11020@dhalsim.dreamhost.com>

On Sat, 5 Feb 2005, Andrew Fedoniouk wrote:
> 
> As stated [1]
> "The :nth-child(an+b) pseudo-class notation represents an 
> element that has an+b-1 siblings before it "
> 
> Question is: does this apply to the root element?
> For example if <html> is a root then shall selector
> 
> html:nth-child(1) { overflow:auto }
> 
> match <html> element?

I was going to answer that yes, it did, but that :first-child didn't, but 
then I noticed that :first-child is defined as being equivalent to 
:nth-child(1), so that is a bit of an issue.

I would therefore assume that :nth-child() does _not_ match elements 
without parent nodes, but the spec should indeed be updated.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 7 February 2005 14:03:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:35 GMT