[whatwg] Reverse ordered lists

Robert (Jamie) Munro rjmunro at arjam.net
Wed Jan 23 16:10:37 PST 2008


David Walbert wrote:
> 
> On Jan 23, 2008, at 11:39 AM, Siemova wrote:
> 
>> Very easily:
>>
>> if start is not specified
>> if not reverse
>> start = 1
>> else
>> start = number of items * step 
>>
> 
> It's not that simple -- the last line should be
> 
> start = 1 + ( (number of items - 1) * step)
> 
> if it's assumed that the last item of the list is numbered one by default. 

Surely it should be numbered with the step.

<ol step="-2">
<li>Foo</li>
<li>Bar</li>
<li>Baz</li>
</ol>

Should be:
6. Foo
4. Bar
2. Baz

not:
5. Foo
3. Bar
1. Baz

Robert (Jamie) Munro

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080124/633dfb4f/attachment-0001.pgp>


More information about the whatwg mailing list