W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2008

[whatwg] Reverse ordered lists

From: Siemova <siemova@gmail.com>
Date: Wed, 23 Jan 2008 09:25:27 -0600
Message-ID: <7ab2f40d0801230725l789e2a53j522e010c4dc8f8fc@mail.gmail.com>
Ah, yes, true enough. For a moment I forgot that. Thank you for pointing it
out.

So default would logically be for the numbering to end at 1. Thus, the code

< ol reverse>
< li>Red</li>
< li>Orange</li>
< li>Yellow</li>
< li>Green</li>
< li>Blue</li>
< /ol>

would display as:

5. Red
4. Orange
3. Yellow
2. Green
1. Blue

If you included step="2", it would display this way:

9. Red
7. Orange
5. Yellow
3. Green
1. Blue

And, if after that you threw a start="4" onto it:

4. Red
2. Orange
0. Yellow
-2. Green
-4. Blue

I guess that's what I was thinking of when I told Sam I don't see a problem
with negative values. But it would only occur in a case where you used a
start value which was lower than the step value times the number of list
items. Otherwise (to repeat myself) a reversed list would end at 1 by
default.

Sounds perfectly reasonable to me.

- Jason



On Jan 23, 2008 8:58 AM, Simon Pieters <simonp at opera.com> wrote:

> On Wed, 23 Jan 2008 15:03:42 +0100, Lachlan Hunt
> <lachlan.hunt at lachy.id.au> wrote:
>
> > Simon Pieters wrote:
> >>    <ol start="100" reverse>
> >>  The lack of start='' would make the numbers update as the list is
> >> filled with <li>s. This allows both for simplicitly for short lists and
> >> correct incremental rendering for large lists.
> >
> > No, the lack of an explicit start attribute would make it start from the
> > default value: 1.  It would then count down from there:
> >
> >   1. A
> >   0. B
> > -1. C
> > -2. D
>
> Why? From an authoring perspective I would say that it's more useful to
> have the last item be 1 by default.
>
> --
> Simon Pieters
> Opera Software
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080123/fd237ac8/attachment.htm>
Received on Wednesday, 23 January 2008 07:25:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:00 UTC