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

Re: proposal for a new css combinator

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 14 Jan 2010 10:59:20 -0600
Message-ID: <dd0fbad1001140859o5ef78715w6767db0886785ed2@mail.gmail.com>
To: Aryeh Gregor <Simetrical+w3c@gmail.com>
Cc: James Elmore <James.Elmore@cox.net>, Niels Matthijs <niels.matthijs@internetarchitects.be>, www-style list <www-style@w3.org>
On Thu, Jan 14, 2010 at 10:51 AM, Aryeh Gregor <Simetrical+w3c@gmail.com> wrote:
> 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?

Yes.

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

The Lists module has a note that the WG considered an 'auto' value for
list-style-type, that would make the UA choose a different value than
the closest parent, but left the exact choice up to th UA.  It's not
in the actual spec now, but I agree that the ability to define nested
lists so that they alternate *somehow* would be useful.

Note, though, that you can just set list-style-type on the ul itself,
which would simplify your selectors somewhat.

~TJ
Received on Thursday, 14 January 2010 17:00:13 GMT

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