Skip to content

Commit d902575

Browse files
committed
[css-counter-styles-3] Define 'negative-capable', define that fixed and cyclic aren't that.
1 parent d7b497a commit d902575

2 files changed

Lines changed: 50 additions & 14 deletions

File tree

css-counter-styles-3/Overview.html

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,11 @@ <h2 id=counter-styles><span class=secno>2. </span> Counter Styles</h2>
381381
<li> a <dfn id=name title=counter-name>name</dfn>, to identify the style
382382

383383
<li> an <dfn id=algorithm title=counter-algorithm>algorithm</dfn> that
384-
transforms counter values into a string representation
384+
transforms counter values into a basic string representation
385385

386386
<li> a <dfn id=negative-sign title=counter-negative>negative sign</dfn>,
387387
which is prepended or appended to the representation of a negative
388-
counter value
388+
counter value.
389389

390390
<li> a <dfn id=prefix title=counter-prefix>prefix</dfn>, to prepend to the
391391
representation
@@ -411,8 +411,8 @@ <h2 id=counter-styles><span class=secno>2. </span> Counter Styles</h2>
411411
particular counter value, follow these steps:
412412

413413
<ol>
414-
<li> If the counter value is outside the <a href="#range"><i
415-
title=counter-range>range</i></a> of the counter style, exit this
414+
<li> If the counter value is outside the <a
415+
href="#descdef-range"><i>range</i></a> of the counter style, exit this
416416
algorithm and instead <a
417417
href="#generate-a-counter-representation"><i>generate a counter
418418
representation</i></a> using the counter style's fallback style and the
@@ -421,17 +421,19 @@ <h2 id=counter-styles><span class=secno>2. </span> Counter Styles</h2>
421421
<li> Using the counter value and the <a href="#algorithm"><i
422422
title=counter-algorithm>counter algorithm</i></a> for the counter style,
423423
generate an initial representation for the counter value. If the counter
424-
value is negative, instead generate an initial representation using the
425-
absolute value of it.
424+
value is negative and the counter style is <a
425+
href="#negative-capable"><i>negative-capable</i></a>, instead generate an
426+
initial representation using the absolute value of the counter value.
426427

427428
<li> If the representation uses less symbols than specified in the counter
428429
style's ‘<a href="#descdef-width"><code
429430
class=property>width</code></a>’ descriptor, prepend symbols to the
430431
representation as specified in the ‘<a href="#descdef-width"><code
431432
class=property>width</code></a>’ descriptor.
432433

433-
<li> If the counter value is negative, wrap the representation in the
434-
counter style's <a href="#negative-sign"><i
434+
<li> If the counter value is negative and the counter style is <a
435+
href="#negative-capable"><i>negative-capable</i></a>, wrap the
436+
representation in the counter style's <a href="#negative-sign"><i
435437
title=counter-negative>negative sign</i></a> as specified in the ‘<a
436438
href="#descdef-negative"><code class=property>negative</code></a>
437439
descriptor.
@@ -1050,6 +1052,23 @@ <h3 id=counter-style-negative><span class=secno>3.2. </span> Formatting
10501052
used in financial contexts, like "(2) (1) 0 1 2 3...".
10511053
</div>
10521054

1055+
<p> Not all ‘<a href="#descdef-system"><code
1056+
class=property>system</code></a>’ values use a negative sign. In
1057+
particular, a counter style is <dfn
1058+
id=negative-capable>negative-capable</dfn> is one where its ‘<a
1059+
href="#descdef-system"><code class=property>system</code></a>’ value is
1060+
<a href="#symbolic"><code class=css>symbolic</code></a>’, ‘<a
1061+
href="#speak-as-alphabetic"><code class=css>alphabetic</code></a>’,
1062+
<a href="#speak-as-numeric"><code class=css>numeric</code></a>’,
1063+
<a href="#additive"><code class=css>additive</code></a>’, or ‘<a
1064+
href="#override"><code class=css>override</code></a>’ if the overridden
1065+
counter style is itself <a
1066+
href="#negative-capable"><i>negative-capable</i></a>. If a counter style
1067+
is not <a href="#negative-capable"><i>negative-capable</i></a>, it ignores
1068+
the negative sign when <a href="#generate-a-counter-representation"><i
1069+
title="generate a counter representation">generating a counter
1070+
representation</i></a>.
1071+
10531072
<h3 id=counter-style-prefix><span class=secno>3.3. </span> Symbols before
10541073
the marker: the ‘<a href="#descdef-prefix"><code
10551074
class=property>prefix</code></a>’ descriptor</h3>
@@ -3954,6 +3973,9 @@ <h2 class=no-num id=index>Index</h2>
39543973
<li>negative, <a href="#descdef-negative"
39553974
title="section 3.2."><strong>3.2.</strong></a>
39563975

3976+
<li>negative-capable, <a href="#negative-capable"
3977+
title="section 3.2."><strong>3.2.</strong></a>
3978+
39573979
<li><a href="#speak-as-numeric"><code class=css>numeric</code></a>’,
39583980
<a href="#numeric" title="section 3.1.5."><strong>3.1.5.</strong></a>, <a
39593981
href="#speak-as-numeric" title="section 3.9."><strong>3.9.</strong></a>

css-counter-styles-3/Overview.src.html

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ <h2 id='counter-styles'>
111111

112112
<li>
113113
an <dfn title='counter-algorithm'>algorithm</dfn>
114-
that transforms counter values into a string representation
114+
that transforms counter values into a basic string representation
115115

116116
<li>
117117
a <dfn title='counter-negative'>negative sign</dfn>,
118-
which is prepended or appended to the representation of a negative counter value
118+
which is prepended or appended to the representation of a negative counter value.
119119

120120
<li>
121121
a <dfn title='counter-prefix'>prefix</dfn>,
@@ -146,22 +146,24 @@ <h2 id='counter-styles'>
146146

147147
<ol>
148148
<li>
149-
If the counter value is outside the <i title='counter-range'>range</i> of the counter style,
149+
If the counter value is outside the <i>range</i> of the counter style,
150150
exit this algorithm and instead <i>generate a counter representation</i>
151151
using the counter style's fallback style and the same counter value.
152152

153153
<li>
154154
Using the counter value and the <i title='counter-algorithm'>counter algorithm</i> for the counter style,
155155
generate an initial representation for the counter value.
156-
If the counter value is negative,
157-
instead generate an initial representation using the absolute value of it.
156+
If the counter value is negative
157+
and the counter style is <i>negative-capable</i>,
158+
instead generate an initial representation using the absolute value of the counter value.
158159

159160
<li>
160161
If the representation uses less symbols than specified in the counter style's 'width' descriptor,
161162
prepend symbols to the representation as specified in the 'width' descriptor.
162163

163164
<li>
164-
If the counter value is negative,
165+
If the counter value is negative
166+
and the counter style is <i>negative-capable</i>,
165167
wrap the representation in the counter style's <i title='counter-negative'>negative sign</i>
166168
as specified in the 'negative' descriptor.
167169

@@ -714,6 +716,18 @@ <h3 id='counter-style-negative'>
714716
contexts, like "(2) (1) 0 1 2 3...".
715717
</div>
716718

719+
<p>
720+
Not all 'system' values use a negative sign.
721+
In particular, a counter style is <dfn>negative-capable</dfn>
722+
is one where its 'system' value is
723+
''symbolic'',
724+
''alphabetic'',
725+
''numeric'',
726+
''additive'',
727+
or ''override'' if the overridden counter style is itself <i>negative-capable</i>.
728+
If a counter style is not <i>negative-capable</i>,
729+
it ignores the negative sign when <i title="generate a counter representation">generating a counter representation</i>.
730+
717731

718732
<h3 id='counter-style-prefix'>
719733
Symbols before the marker: the 'prefix' descriptor</h3>

0 commit comments

Comments
 (0)