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

Re: First-descendant-of-type selector?

From: Sander <www-style@juima.org>
Date: Sat, 02 Sep 2006 18:42:58 +0200
Message-ID: <44F9B492.2020307@juima.org>
To: www-style@w3.org

Sander wrote:
> ul#a>li, ul#a *:not(ol):not(ul) li { }
> 
> Selects the direct li-children, and all li-descendants which aren't
> descendants of a descendant-list.
> (Pretty close to Björn's solution, but without the direct child selector
> between :not and li.)

Oh meh, a second after I hit send, I realized the flaw is that there can
be multiple descendants between ul#a and li, and that at least one of
them will satisfy *:not(ol):not(ul). And going:
ul#a > :not(ol):not(ul) > li, ul#a > :not(ol):not(ul) > :not(ol):not(ul)
> li, ul#a > :not(ol):not(ul) > :not(ol):not(ul) > :not(ol):not(ul) > li { }
is obviously not a workable solution. :)

Sander
Received on Saturday, 2 September 2006 16:42:46 GMT

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