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:36:42 +0200
Message-ID: <44F9B31A.7020502@juima.org>
To: dolphinling <lists@dolphinling.net>
CC: www-style@w3.org

dolphinling wrote:
> Suppose HTML were extended so that <li> had to be a descendant of <ul>, but not
> necessarily a child: there could be another element (or multiple elements)
> between them. Is there any way to reliably select the <li>(s) in that case?

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.)

Received on Saturday, 2 September 2006 16:36:29 UTC

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