W3C home > Mailing lists > Public > www-style@w3.org > February 2014

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

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Tue, 25 Feb 2014 09:24:27 +1100
Message-ID: <CAMdq69-kZKEOOeCCXz2FTz=+-+Mi=G8phR9UXt0pQ5Zxw2mi2Q@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC