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

[selectors] Tree selectors

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Mon, 21 Mar 2005 10:29:52 +0100
Message-ID: <423E9410.704@annevankesteren.nl>
To: W3C CSS List <www-style@w3.org>

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. For example:

  foo (odd)
   foo (even)
    foo (odd)
     foo (...)
      foo
       foo
        ...

... or:

  ul
   li
    ul
     li
      ul
       li
        ...

... there is no way to select all "even" or all "odd", which is possible 
when you do not have a tree but a list of siblings:

  foo
  foo
  foo
  foo
  ...

... I think some :depth(arg) pseudo-class or other method should be 
designed to have similar options for trees.


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>
Received on Monday, 21 March 2005 11:08:33 GMT

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