- From: L. David Baron <dbaron@dbaron.org>
- Date: Thu, 24 Apr 2014 15:45:32 -0700
- To: www-style@w3.org
- Message-ID: <20140424224532.GA30543@crum.dbaron.org>
On Thursday 2014-04-24 15:36 -0700, L. David Baron wrote:
> Two parts of the spec say inconsistent things about the interaction
> of the 'negative' and 'pad' descriptors.
>
> I will explain both of them in terms of how they apply to the
> definition of decimal-leading-zero in
> http://dev.w3.org/csswg/css-counter-styles/#simple-numeric , which
> has effectively:
> pad: 2 '0';
> negative: '-';
Oops, I forgot to actually do this explanation.
> http://dev.w3.org/csswg/css-counter-styles/#generate-a-counter says
> that 'pad' is applied first, and this is done by:
> # 4. If the representation uses less symbols than specified in
> # the counter style’s pad descriptor, prepend symbols to the
> # representation as specified in the pad descriptor.
This implies that the decimal-leading-zero style for -1 is the
string "-01", which matches Chrome.
> On the other hand,
> http://dev.w3.org/csswg/css-counter-styles/#counter-style-pad says:
> # If the counter value is negative and the counter style is
> # negative-capable, further reduce difference by the number of
> # grapheme clusters in the counter style’s negative descriptor’s
> # <symbol>(s).
This implies that the decimal-leading-zero style for -1 is the
string "-1", which matches Firefox.
-David
--
𝄞 L. David Baron http://dbaron.org/ 𝄂
𝄢 Mozilla https://www.mozilla.org/ 𝄂
Before I built a wall I'd ask to know
What I was walling in or walling out,
And to whom I was like to give offense.
- Robert Frost, Mending Wall (1914)
Received on Thursday, 24 April 2014 22:45:56 UTC