Re: First-descendant-of-type selector?

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 UTC