W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: proposal for a new css combinator

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Thu, 14 Jan 2010 11:51:27 -0500
Message-ID: <7c2a12e21001140851w68f8a9d1yb841d235696f517a@mail.gmail.com>
To: James Elmore <James.Elmore@cox.net>
Cc: Niels Matthijs <niels.matthijs@internetarchitects.be>, www-style list <www-style@w3.org>
On Thu, Jan 14, 2010 at 10:58 AM, James Elmore <James.Elmore@cox.net> wrote:
> What about allowing multiple limits? A combinator could let the depth of
> control be stated, or limited by the designer.
>
> Just as an example, "h1 (1-2)h2" might select the first two levels of h2
> elements under an h1 element.

Isn't this the same as h1 % h2, h1 % h2 % h2?

> Even more, the (an+b) syntax might allow each nth child (or other
> combinator) to be selected, so, for example, alternate headings could be
> different colors.

This might be useful.  For instance, one common requirement is to have
list bullets differ with nesting.  This would be nice to have like

ul > li { list-style-type: disc }
ul > li ul > li { list-style-type: square }
ul > li ul > li ul > li { list-style-type: circle }

Ideally you'd like to continue disc, square, circle, disc, square, circle, . . .
Received on Thursday, 14 January 2010 16:51:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:23 GMT