W3C home > Mailing lists > Public > www-style@w3.org > September 2006

Re: First-descendant-of-type selector?

From: dolphinling <lists@dolphinling.net>
Date: Sat, 02 Sep 2006 12:19:25 -0400
Message-ID: <44F9AF0D.5070702@dolphinling.net>
To: W3C CSS List <www-style@w3.org>
CC: Lachlan Hunt <lachlan.hunt@lachy.id.au>

Lachlan Hunt wrote:
> Andrew Fedoniouk wrote:
>> If :not will be relaxed to contain not only simple selectors
>> then selector
>> [...]
>> Say selector like
>> X Y:not(X > Y)
>> naturally complements "X Y" and "X>Y" selectors.
> I think that would be equivalent to this:
> X :not(X)>Y
> Both would select a Y that is a descendant (but not a child) of an X.

That's very close, but unfortunately it doesn't work.

Take this case:

<ul id="a">
       <ul id="b">

In this case,
ul#a :not(ul#a)>li
selects the <li> inside <bar>, even though it's not an item of list a. (This is 
the same problem with Bjoern's nearly-identical solution above.)

Received on Saturday, 2 September 2006 16:19:59 UTC

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