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

Re: Outline Numbered Lists

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 18 Jun 2009 19:29:15 -0500
Message-ID: <dd0fbad0906181729s461ecbc9u8aaacf381cedffe1@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 5:23 PM, Dylan Just<dylan.just@ephox.com> wrote:
> These workarounds are great, but they are all complicated. Yes,
> separation of style and content is a good thing, but the 'style'
> attribute is a practical necessity when you don't have access to the
> stylesheet or a <style> block - this is simply a constraint placed upon
> us by most CMS vendors. In most cases, we only have access to edit the
> contents of the <body>. Stylesheets are generally managed by an entirely
> different subsystem.

You can put <style> in the <body>. <style scoped> is *only* sensical
when placed in the <body>.

> Even with the workarounds available, and regardless of content vs style,
> it would still be useful to have a simple css attribute as a 'shortcut'
> to set this common style. If I can set a normal bulleted/numbered list
> with one css attribute, why do I need 3-8 to create an outline numbered
> list?

Because normal lists don't have to refer to surrounding lists to know
how to display.  There's no need to specify which lists to refer to,
nor how to combine the lists together to form a new marker.

Also, where'd you get the 3-8 figure from?  The example given in the
first reply takes 4, and if you can assume ::marker support you can
drop one (the list-style-type:none rule) to do it in 3.

> Counters and ::before provide useful flexibility for general cases. What
> I'm suggesting is a simple shortcut for a common use case.

I don't believe the issue *is* simple, though.  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

These sorts of issues are automatically answered by the existing
solution.  If you use the same counters for both of the outline lists,
then they concatenate.  The middle list doesn't interfere at all.  If
you use different counters, they won't.

I'm open to being convinced that there's a good way to solve this
without ambiguity, but honestly the counters-based solution is pretty
simple once you know that counters exist, and as it *already works*,
I'm happy with it.

Received on Friday, 19 June 2009 00:30:12 UTC

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