[whatwg] Reverse ordered lists

Siemova siemova at gmail.com
Wed Jan 23 08:39:05 PST 2008


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

> It's also interesting how negative numbers and 0 interacts with different
> list type=''s in different browsers...
>
>
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Col%20type%3Da%20start%3D-2%3E%3Cli%3Ex%3Cli%3Ex%3Cli%3Ex%3Cli%3Ex%3Cli%3Ex



Huh. One would think UA's should ignore negative start values in
non-numerical cases. For that matter, *any *ordered list type ought to
ignore *all *inapplicable start values. Perhaps that ought to be specified
in the recommendation?



> It was pointed out to me that the start='' attribute (and the
> corresponding DOM attribute) currently defaults to 1. This could, AFAICT,
> reaonably trivially be changed to make it depend on the direction of the
> list and the number of <li> children.



Very easily:

if start is not specified
if not reverse
start = 1
else
start = number of items * step


- Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080123/70d53f85/attachment-0001.htm>


More information about the whatwg mailing list