[whatwg] Reverse ordered lists
Siemova
siemova at gmail.com
Wed Jan 23 07:10:02 PST 2008
But then what would someone do in order to begin a list but not end it? For
instance, if they wanted to say:
"10. Blah
9. Blah
8. Blah
And so forth..."
I guess I'm asking, why recommend artificial and unnecessarily narrow
constraints? We don't want UAs to force unexpected behaviors which would
frustrate the end user and make them search (vainly) for a workaround if
that's not what they wanted, do we?
Personally, I don't see any problem with allowing list items to be numbered
0 or negatively, so I think the "1, 0, -1, -2" default approach would work
fine. With both "reverse" and "step" we could still accomplish what you're
talking about, but the spec would remain both simpler for UAs to implement
and more flexible for content creators' use.
- Jason
On Jan 23, 2008 8:23 AM, Sam Arthur Allen <dev at atshop3d.com> wrote:
Actually, the best route I can see is to not have a start attribute at
> all but to rely on the browser to automatically detect the amount of
> <li> tags within an
> <ol reverse> container and decrement from there. ie:
>
> <ol reverse> <-- Start count from here.
> <li>Red</li>
> <li>Orange</li>
> <li>Yellow</li>
> <li>Green</li>
> <li>Blue</li>
> </ol> <-- Close tag detected, 5 <li> tags counted.
>
> is rendered as starting from 5:
>
> 5. Red
> 4. Orange
> ...etc...
>
> and using a "step" value, for example, all the browser would need to do
> is multiply the total at the </ol> tag, and decrement that
> multiplied total by the "step" amount, making:
>
> <ol reverse step="5">
>
> render the list as:
>
> 25. Red
> 20. Orange
> 15. Yellow
> ...etc...
>
> It might mean more work for the browsers, but by experience something
> like this isn't too hard to implement.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080123/085c27ae/attachment-0001.htm>
More information about the whatwg
mailing list