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

Re: Réf. : Re: Outline Numbered Lists

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 17 Jun 2009 08:46:40 -0500
Message-ID: <dd0fbad0906170646y6b64554ckde29df2ce89b8f2d@mail.gmail.com>
To: leslie.brown@evidian.com
Cc: www-style@w3.org
On Wed, Jun 17, 2009 at 6:09 AM, <leslie.brown@evidian.com> wrote:
>>> I work for a company, Ephox, who develop a wysiwyg HTML editor called
>>> EditLive!. We have a number of law firms as clients, and they require
>>> "outline numbered" lists, in the format:
>>>
>>> 1. Item 1
>>> 1.1. subitem
>>> 1.1.1. sub-sub 1
>>> 1.1.2. sub-sub 2
>>> 1.2. subitem 2
> [...]
>
>> This does the trick on all browsers I tested on (Opera, IE 8, Firefox,
>> Safari, Chrome)
>> http://devfiles.myopera.com/articles/501/nested-counters-example.html
>
> Doesn't work in IE7.

While true, this is something of a non sequitur.  *Any* approach
beyond just inserting the markers into the content won't work on IE7.
A completely new approach (as Dylan suggests) won't work in current
browsers either, though.

Basically, if you need to support IE7, there is NO CSS-based solution.
 You must insert the markers into the content.  If you can ignore IE7,
then there is an existing CSS-based solution that is designed for
exactly this - the counters() construct, which combines all in-scope
counters with a given name and places a given glue string between
them.  At the moment you have to use ::before to implement it, but in
time the ::marker pseudoelement should hopefully be widely usable
instead.

~TJ
Received on Wednesday, 17 June 2009 13:47:32 GMT

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