[css-counter-styles] interaction between 'negative' and 'pad' descriptors

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: '-';

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. 

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).

It seems both that these should be consistent, and that this
shouldn't be defined in two places.

I'd note that the testcase
  data:text/html,<ol start="-1" style="list-style-type:decimal-leading-zero"><li><li><li></ol>
behaves differently in Firefox and Chrome.

-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:36:30 UTC