You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-lists/Overview.src.html
+33-29Lines changed: 33 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -869,9 +869,6 @@ <h2 id='counter-style'>
869
869
style, exit this algorithm and instead <ititle='generate-a-counter'>generate a counter representation</i>
870
870
using the counter style's fallback style and the same counter value.</li>
871
871
872
-
<li>If the counter value is negative, set the <var>negative</var> flag and
873
-
run the rest of this algorithm with the counter value set to its absolute value instead.</li>
874
-
875
872
<li>Using the counter value and the <ititle='counter-algorithm'>counter algorithm</i>
876
873
for the counter style, generate an initial representation for the counter value.</li>
877
874
@@ -994,6 +991,8 @@ <h4>
994
991
<li>If <var>value</var> is 0, append <var>symbol(0)</var> to
995
992
<var>S</var> and return <var>S</var>.</li>
996
993
994
+
<li>If <var>value</var> is negative, run the next step of this algorithm with <var>value</var> being the absolute value of <var>value</var> instead.</li>
995
+
997
996
<li>While <var>value</var> is not equal to 0:
998
997
999
998
<ol>
@@ -1004,6 +1003,8 @@ <h4>
1004
1003
</ol>
1005
1004
</li>
1006
1005
1006
+
<li>If <var>value</var> was originally negative, wrap <var>S</var> in the counter style's <ititle='counter-negative'>negative sign</i>, as specified in the section for the <ahref='#counter-style-negative'>negative descriptor</a>.</li>
1007
+
1007
1008
<li>Return <var>S</var>.</li>
1008
1009
</ol>
1009
1010
@@ -1035,7 +1036,7 @@ <h4>
1035
1036
1036
1037
<p>If the type is <ahref=#alphabetic>alphabetic</a>, the 'symbols' descriptor must contain
1037
1038
at least two <i>counter symbol</i>s. This type is defined only over
1038
-
positive counter values.</p>
1039
+
strictly positive counter values.</p>
1039
1040
1040
1041
<p>The <i>alphabetic</i> counter type interprets the list of <i>counter symbols</i>
1041
1042
as digits to an <em>alphabetic</em> numbering system, similar to the default
@@ -1133,7 +1134,7 @@ <h4>
1133
1134
symbolic</h4>
1134
1135
1135
1136
<p>If the type is <ahref=#symbolic>symbolic</a>, the 'symbols' descriptor must contain at
1136
-
least one <i>counter symbol</i>. This type is defined only over positive
1137
+
least one <i>counter symbol</i>. This type is defined only over strictly positive
1137
1138
counter values.</p>
1138
1139
1139
1140
<p>The <i>symbolic</i> counter type cycles repeatedly through its provided symbols,
@@ -1258,8 +1259,7 @@ <h4>
1258
1259
1259
1260
<p>If the type is <ahref=#additive>additive</a>, the 'additive-symbols' descriptor must
1260
1261
contain at least one <i>additive tuple</i>. This type is nominally
1261
-
defined over all positive counter values (see algorithm, below, for
1262
-
exact details)</p>
1262
+
defined over all counter values (see algorithm, below, for exact details)</p>
1263
1263
1264
1264
<p>The <i>additive</i> counter type takes as many of the largest symbols that
1265
1265
it can, then as many of the next largest symbol, etc. until the sum of all
@@ -1268,33 +1268,35 @@ <h4>
1268
1268
several languages which use different characters for the digits in differnt
1269
1269
positions.</p>
1270
1270
1271
-
<p>To construct the representation, run this algorithm. let<var>value</var>
1271
+
<p>To construct the representation, run this algorithm. Let<var>value</var>
1272
1272
initially be the counter value, <var>S</var> initially be the empty string,
1273
1273
and <var>symbol list</var> initially be the list of <i>additive tuple</i>s.
1274
1274
1275
-
<p>If <var>value</var> is initially 0, and there is an <i>additive tuple</i>
1276
-
with a weight of 0, append that tuple's <i>counter symbol</i> to S
1277
-
and return S.</p>
1275
+
<ol>
1276
+
<li>If <var>value</var> is initially 0, and there is an <i>additive tuple</i> with a weight of 0, append that tuple's <i>counter symbol</i> to S and return S.</li>
1278
1277
1279
-
<p>Otherwise, while <var>value</var> is greater than 0 and there are elements
1280
-
left in the <var>symbol list</var>:</p>
1278
+
<li>If <var>value</var> is negative, run the next step of this algorithm with <var>value</var> being the absolute value of <var>value</var> instead.</li>
1281
1279
1282
-
<ol>
1283
-
<li>Pop the first <i>additive tuple</i> from the <var>symbol list</var>.
1284
-
This is the <dfntitle="current tuple|current tuple's">current tuple</dfn>.</li>
1280
+
<li>While <var>value</var> is greater than 0 and there are elements left in the <var>symbol list</var>:
1285
1281
1286
-
<li>Append the <i>current tuple</i>'s <i>counter symbol</i> to <var>S</var>
<p>If the loop ended because <var>value</var> is 0, return S. Otherwise, the
1296
-
given counter value cannot be represented by this counter style, and must
1297
-
instead be represented by the fallback counter style.</p>
1290
+
<li>Decrement <var>value</var> by the <var><i>current tuple's</i> weight multiplied
1291
+
by the number of times the <i>current tuple</i> was appended to <var>S</var>
1292
+
in the previous step.</li>
1293
+
</ol>
1294
+
</li>
1295
+
1296
+
<li>If <var>value</var> was originally negative, wrap <var>S</var> in the counter style's <ititle='counter-negative'>negative sign</i>, as specified in the section for the <ahref='#counter-style-negative'>negative descriptor</a>.</li>
1297
+
1298
+
<li>If the loop ended because <var>value</var> is 0, return S. Otherwise, the given counter value cannot be represented by this counter style, and must instead be represented by the fallback counter style.</li>
<p>The 'range' descriptor defines the range over which the counter style is defined.
1434
1436
If a counter style is used to represent a counter value outside of its range,
1435
1437
the counter style instead drops down to its fallback counter style.</p>
1436
1438
1437
-
<p>The first value represents the lower bound of the range (with 'infinite'
1439
+
<p>If the value is not ''auto'', the first value represents the lower bound of the range (with 'infinite'
1438
1440
representing negative infinity), and the second value represents the upper bound
1439
1441
of the range (with 'infinite' representing positive infinity). This is an inclusive
1440
1442
range - it includes both the lower and upper bound numbers. If the lower
1441
1443
bound is higher than the higher bound, the descriptor is invalid and must
1442
1444
be ignored.</p>
1443
1445
1446
+
<p>If the value is ''auto'', the range depends on the counter type. For ''repeating'', ''numeric'', and ''non-repeating'' types, it must be treated identically to specifying ''infinite infinite''. For ''alphabetic'' and ''symbolic'', it must be treated identically to ''1 infinite''. For ''additive'', it must be treated identically to ''0 infinite''. For ''override'', it must be treated according to the type of the counter style it is overriding.</p>
1447
+
1444
1448
<p>Some counter style types have their own implicit ranges, specified above
1445
1449
in the individual descriptions for each type. The explicit range given
1446
1450
by the ‘<codeclass="css">range</code>’ descriptor applies at the same time
0 commit comments