Re: [selectors] Tree selectors

On Tuesday 2005-03-22 01:55 +0100, Allan Sandfeld Jensen wrote:
> 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.

Maying selectors depend on the computed values of properties imposes
significant constraints on implementations that don't exist today (and
some of which probably aren't met by most implementations).  The
problems would be even worse (i.e., it would become impossible to
implement correctly without allowing infinite loops) given the
introduction of certainly highly requested combinators (such as ancestor
combinators, previous sibling combinators, :has, :matches, etc.).  It
also tightly couples selectors to CSS, which makes selectors less usable
in other applications.

I'm thus strongly opposed to any such proposal.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
          Technical Lead, Layout & CSS, The Mozilla Foundation

Received on Tuesday, 22 March 2005 09:08:45 UTC