[selectors] Tree selectors

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 UTC