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

On Mon, Dec 12, 2011 at 7:58 PM, Ian Hickson <ian at hixie.ch> wrote:
> 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.
>

That's what I understand.

>
>> 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?

Well it doesn't clearly say it but if I quote :

"The reversed attribute is a boolean attribute. If present, it
indicates that the list is a descending list (..., 3, 2, 1). If the
attribute is omitted, the list is an ascending list (1, 2, 3, ...)."

Maybe we should replace "indicates that the list is a descending list
(..., 3, 2, 1)" by "indicates that the list is a descending list (...,
3, 2, 1, 0, -1,...).

That was *for me* the confusing part but maybe it is just me.

>
> --
> Ian Hickson ? ? ? ? ? ? ? U+1047E ? ? ? ? ? ? ? ?)\._.,--....,'``. ? ?fL
> http://ln.hixie.ch/ ? ? ? U+263A ? ? ? ? ? ? ? ?/, ? _.. \ ? _\ ?;`._ ,.
> Things that are impossible just take longer. ? `._.-(,_..'--(,_..'`-.;.'



-- 
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil

Received on Tuesday, 13 December 2011 03:21:47 UTC