Re: [css-counter-styles] Behavior of zero in system 'alphabetic' & 'symbolic'

On Tue, Feb 25, 2014 at 9:05 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> On 24/02/2014 21:49, Tab Atkins Jr. wrote:
>>
>> On Sun, Feb 23, 2014 at 12:12 AM, Xidorn Quan <quanxunzhen@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> The spec says, 'alphabetic' and 'symbolic' are "defined only over
>>> strictly positive counter values", while they are also
>>> negative-capable. Consequently, if an author defines a style:
>>>
>>> @counter-style a { system: symbolic; range: -10 10; symbols: a; }
>>>
>>> and use value -2 - 2, then, according to the rules, he will get: -aa,
>>> -a, 0, a, aa. The zero in the middle seems to be strange. I propose
>>> that we could make the defination cover zero, and generate an empty
>>> sequence for zero.
>>
>>
>> I agree that the 0 in the middle is strange, but I think it's even
>> stranger to generate an empty counter representation.  Note that I'd
>> also have to then hook into the rest of the algorithm, so that it
>> doesn't get a prefix, suffix, or pad added to it.
>
>
> How common is it to have all of negative, zero, and positive counter values
> in the same list?
>
> As far as I can tell, it’s uncommon enough (less than negative counter
> values in general, which are not common themselves) that we shouldn’t bother
> making it pretty. (This is a feeling based on zero data, though.)

It is not uncommon to have both zero and positive counter values in
the same list at least.

- Xidorn

Received on Monday, 24 February 2014 22:25:35 UTC