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

Re: [selectors] Tree selectors

From: Allan Sandfeld Jensen <kde@carewolf.com>
Date: Tue, 22 Mar 2005 01:55:14 +0100
To: www-style@w3.org
Message-Id: <200503220155.15171.kde@carewolf.com>

On Monday 21 March 2005 10:29, Anne van Kesteren wrote:
> The current Selectors specification ([css3-selectors]) defines various
> methods for selecting siblings using :nth-child. However, it does not
> define such a method for trees.

Rather than add even more specialised selectors how about adding one based on 
counters ":nth-counter" could be used to select anything anyway the developer 
choices. For counting depth you would use :before {counter-increment: depth 
1} and :after { counter-increment: depth -1 }. It could also very easily 
replace the existing :nth-of-type and page selection.

Received on Tuesday, 22 March 2005 00:55:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:17 UTC