W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2011

[whatwg] <ol reversed> with start value and "underflow"

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 12 Dec 2011 22:58:29 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1112122255240.6235@ps20323.dreamhostps.com>
On Mon, 12 Dec 2011, Alexis Menard wrote:
> 
> Then come the question, what if I write :
> 
> <h3>Top 100</h3>
> <ol reversed="reversed" start="100">
>   <li>False Dichotomy</li>
>   <li>Appeal to Ridicule</li>
>   <li>Begging the Question (Circular Logic)</li>
>   <!-- Items omitted here -->
>   <li value="3">Strawman</li>
>   <li>Bare Assertion Fallacy</li>
>   <li>Argumentum ad Ignorantiam</li>
>   <li>Test</li>
> </ol>
> 
> What should be the actual number of "Test" when rendered?

Zero.


> and what if there are more items after "Test"? -1, -2,...?

Yes. The spec says "Each subsequent item in the list has [...] the ordinal 
value of the previous item [...] minus one" (omitting spec text that 
doesn't apply here regarding the value="" attribute and the reversed="" 
attribute -- see the spec for precise rules).


> The spec seems to say that it should stop a 1 but then what value I 
> should display for "Test"?

Where does it suggest that you should stop at 1?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 12 December 2011 14:58:29 UTC

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