W3C home > Mailing lists > Public > www-style@w3.org > June 2009

Re: Outline Numbered Lists

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 19 Jun 2009 09:00:35 -0500
Message-ID: <dd0fbad0906190700q5251d024xa426d60ce1bf49c6@mail.gmail.com>
To: Dylan Just <dylan.just@ephox.com>
Cc: Giovanni Campagna <scampa.giovanni@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
On Thu, Jun 18, 2009 at 9:02 PM, Dylan Just<dylan.just@ephox.com> wrote:
>> Say we create an
>> additional list-style-type called outline.  How exactly does this
>> work? Does it automatically gather and concatenate all previous
>> outline lists?  What happens if you nest lists with not all of them
>> being outline, like:
>> <ol type=outline>
>>  <ol type=upper-roman>
>>    <ol type=outline>
>> ...
>
>> Does the inner outline grab from the outer outline?  Does it grab from
>> the upper-roman in the middle?  Or does it start a new outline
>> entirely?
>
> Point taken, but this is a corner case and more complex than the use cases I'm talking about. As we're talking about a simple shortcut, of course you sacrifice some control and these scenarios arise. But, all you need to do is specify one sensible behaviour as the default, and if the user wants something different, they can use counters.
>
> I think the best option is:
> - Firstly, use list-style-outline:outline, instead of a new list-style-type (see below)
> - If the parent is outlined, grab whatever the parent's marker is and append to it.
> - If the parent isn't outlined, start a new list.
>
> All of the requests we've seen have been for lists with numbers and dots like this:
> 1.
> 1.1.
> 1.1.1.
>
> Which would be solved by:
> <ol style="list-style-outline:outline;">
> <ol>
> <ol>
>
> Beyond that, I don't think it really matters what we decide for the corner cases.

That sounds pretty good, actually.  So then list-style-outline would
be inherited, obviously, so that it cascades down to the children
<ol>s.  Cool.

> I think that a list-style-outline:outline would be better than a new list-style-type, as it means we can do outlines for different list-style-types. E.g. it'd let you do:
> 1.
> 1.a.
> 1.a.i.
> 1.a.ii.
>
> That gives a lot of flexibility with just a simple binary attribute combined with what's already available in list-style-type.

Yup, sounds nice.  I know I've seen books use mixtures of counter
types for their outlines (my mind seems to recall upper-roman being
mixed with lower-roman).

On Fri, Jun 19, 2009 at 2:17 AM, fantasai<fantasai.lists@inkedblade.net> wrote:
> Dylan Just wrote:
>>
>> I think that a list-style-outline:outline would be better than a new
>> list-style-type, as it means we can do outlines for different
>> list-style-types.
>> E.g. it'd let you do:
>> 1.
>> 1.a.
>> 1.a.i.
>> 1.a.ii.
>
> This is an interesting case right here, one you can't do with counters().
> counters() can only take one counter-style, and it has no way of looking
> up what styles have been used previously.
>
> We could maybe introduce a new counter-style, I'll call it 'auto' for now,
> that, when it looks up a counter instance, associates the element's
> list-style-type with the counter and uses that style for that counter.
> Not exactly sure how to describe the counter instance's relationship to
> the relevant element, but I /think/ that should be possible. dbaron?
>
> (I can see it being useful even with counter(); you can change the style
> of the counter without fiddling with the content property that sets it.)

Now that I look at the counters section of CSS2 again, I'm actually
surprised this doesn't already exist.  I would have expected that it
did.

(This thread, btw, has been massively helpful to me, as I had to idea
that the counters section of the spec had been implemented so widely.
I get to start using it now, glee!)

~TJ
Received on Friday, 19 June 2009 14:01:27 GMT

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