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

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 UTC