Skip to content

Commit fae2fd8

Browse files
committed
[css-counter-styles-3] Specify the minimum maximum range for 'range', per WG decision. Rework the text for 'range'.
1 parent 3145751 commit fae2fd8

File tree

2 files changed

+76
-50
lines changed

2 files changed

+76
-50
lines changed

css-counter-styles-3/Overview.html

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
230230
descriptor</a>
231231

232232
<li><a href="#counter-style-width"><span class=secno>3.6. </span>
233-
Constant-width Representations: the ‘<code
233+
Zero-Padding and Constant-Width Representations: the ‘<code
234234
class=property>width</code>’ descriptor</a>
235235

236236
<li><a href="#counter-style-fallback"><span class=secno>3.7. </span>
@@ -1136,47 +1136,44 @@ <h3 id=counter-style-range><span class=secno>3.5. </span> Limiting the
11361136
ranges, the counter style instead drops down to its fallback counter
11371137
style.
11381138

1139-
<p>If the value is not ‘<a href="#speak-as-auto"><code
1140-
class=css>auto</code></a>’, the first value of each range in the list
1141-
represents the lower bound of the range (with ‘<code
1142-
class=css>infinite</code>’ representing negative infinity), and the
1143-
second value represents the upper bound of the range (with ‘<code
1144-
class=property>infinite</code>’ representing positive infinity). This is
1145-
an inclusive range - it includes both the lower and upper bound numbers.
1146-
The range of the counter style as a whole is the union of the individual
1147-
ranges. If the lower bound of any range is higher than the higher bound,
1148-
the entire descriptor is invalid and must be ignored.
1149-
1150-
<p>If the value is ‘<a href="#speak-as-auto"><code
1151-
class=css>auto</code></a>’, the range depends on the counter system. For
1152-
<a href="#cyclic"><code class=css>cyclic</code></a>’, ‘<a
1153-
href="#speak-as-numeric"><code class=css>numeric</code></a>’, and ‘<a
1154-
href="#fixed"><code class=css>fixed</code></a>’ systems, it must be
1155-
treated identically to specifying ‘<code class=css>infinite
1156-
infinite</code>’. For ‘<a href="#speak-as-alphabetic"><code
1157-
class=css>alphabetic</code></a>’ and ‘<a href="#symbolic"><code
1158-
class=css>symbolic</code></a>’, it must be treated identically to
1159-
<code class=css>1 infinite</code>’. For ‘<a href="#additive"><code
1160-
class=css>additive</code></a>’, it must be treated identically to
1161-
<code class=css>0 infinite</code>’. For ‘<a href="#override"><code
1162-
class=css>override</code></a>’, it must be treated according to the
1163-
system of the counter style it is overriding.
1164-
1165-
<p>Some counter style systems have their own implicit ranges, specified
1166-
above in the individual descriptions for each system. The explicit range
1167-
given by the ‘<a href="#descdef-range"><code class=css><code
1168-
class=css>range</code></code></a>’ descriptor applies at the same time
1169-
as the implicit range given by the ‘<a href="#descdef-system"><code
1170-
class=css><code class=css>system</code></code></a>’ descriptor - if the
1171-
counter value is outside either range, the fallback style must instead be
1172-
used to generate the representation.
1173-
1174-
<p class=issue>There's also an implicit range coming from implementation
1175-
limits. Should we require UAs to support all values in a signed 2-byte
1176-
int, or a signed 4-byte int?
1177-
1178-
<h3 id=counter-style-width><span class=secno>3.6. </span> Constant-width
1179-
Representations: the ‘<a href="#descdef-width"><code
1139+
<dl>
1140+
<dt>auto
1141+
1142+
<dd> The range depends on the counter system. For ‘<a
1143+
href="#cyclic"><code class=css>cyclic</code></a>’, ‘<a
1144+
href="#speak-as-numeric"><code class=css>numeric</code></a>’, and ‘<a
1145+
href="#fixed"><code class=css>fixed</code></a>’ systems, the range is
1146+
negative infinity to positive infinity. For ‘<a
1147+
href="#speak-as-alphabetic"><code class=css>alphabetic</code></a>’ and
1148+
<a href="#symbolic"><code class=css>symbolic</code></a>’ systems,
1149+
the range is 1 to positive infinity. For ‘<a href="#additive"><code
1150+
class=css>additive</code></a>’ systems, the range is 0 to positive
1151+
infinity. For ‘<a href="#override"><code
1152+
class=css>override</code></a>’ systems, the range is identical to the
1153+
overridden system.
1154+
1155+
<dt>[ [ &lt;integer> | infinite ]{2} ]#
1156+
1157+
<dd> This defines a comma-separated list of ranges. For each individual
1158+
range, the first value is the lower bound and the second value is the
1159+
upper bound. This range is inclusive - it contains both the lower and
1160+
upper bound numbers. If ‘<code class=css>infinity</code>’ is used as
1161+
the first value in a range, it represents negative infinity; if used as
1162+
the second value, it represents positive infinity. The range of the
1163+
counter style is the union of all the ranges defined in the list.
1164+
<p> If the lower bound of any range is higher than the upper bound, the
1165+
entire descriptor is invalid and must be ignored.
1166+
</dl>
1167+
1168+
<p> Implementations must support ranges with a lower bound of at least
1169+
-2<sup>15</sup> and an upper bound of at least 2<sup>15</sup>-1 (the range
1170+
of a signed 2-byte int). They may support higher ranges. If a range is
1171+
specified with a bound greater than the implementation's supported bounds,
1172+
it must be treated as specifying the implementation's maximum supported
1173+
bound.
1174+
1175+
<h3 id=counter-style-width><span class=secno>3.6. </span> Zero-Padding and
1176+
Constant-Width Representations: the ‘<a href="#descdef-width"><code
11801177
class=property>width</code></a>’ descriptor</h3>
11811178

11821179
<table class=descdef>

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

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -776,19 +776,48 @@ <h3 id='counter-style-range'>
776776
If a counter style is used to represent a counter value outside of its ranges,
777777
the counter style instead drops down to its fallback counter style.
778778

779-
<p>If the value is not ''auto'', the first value of each range in the list represents the lower bound of the range (with ''infinite'' representing negative infinity), and the second value represents the upper bound of the range (with 'infinite' representing positive infinity). This is an inclusive range - it includes both the lower and upper bound numbers. The range of the counter style as a whole is the union of the individual ranges. If the lower bound of any range is higher than the higher bound, the entire descriptor is invalid and must be ignored.
780-
781-
<p>If the value is ''auto'', the range depends on the counter system. For ''cyclic'', ''numeric'', and ''fixed'' systems, 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 system of the counter style it is overriding.
779+
<dl>
780+
<dt>auto
781+
<dd>
782+
The range depends on the counter system.
783+
For ''cyclic'', ''numeric'', and ''fixed'' systems,
784+
the range is negative infinity to positive infinity.
785+
For ''alphabetic'' and ''symbolic'' systems,
786+
the range is 1 to positive infinity.
787+
For ''additive'' systems,
788+
the range is 0 to positive infinity.
789+
For ''override'' systems,
790+
the range is identical to the overridden system.
791+
792+
<dt>[ [ &lt;integer> | infinite ]{2} ]#
793+
<dd>
794+
This defines a comma-separated list of ranges.
795+
For each individual range,
796+
the first value is the lower bound
797+
and the second value is the upper bound.
798+
This range is inclusive - it contains both the lower and upper bound numbers.
799+
If ''infinity'' is used as the first value in a range,
800+
it represents negative infinity;
801+
if used as the second value,
802+
it represents positive infinity.
803+
The range of the counter style is the union of all the ranges defined in the list.
782804

783-
<p>Some counter style systems have their own implicit ranges, specified above in the individual descriptions for each system. The explicit range given by the ''<code class="css">range</code>'' descriptor applies at the same time as the implicit range given by the ''<code class="css">system</code>'' descriptor - if the counter value is outside either range, the fallback style must instead be used to generate the representation.
805+
<p>
806+
If the lower bound of any range is higher than the upper bound,
807+
the entire descriptor is invalid and must be ignored.
808+
</dl>
784809

785-
<p class=issue>There's also an implicit range coming from implementation
786-
limits. Should we require UAs to support all values in a signed 2-byte int,
787-
or a signed 4-byte int?
810+
<p>
811+
Implementations must support ranges with a lower bound of at least -2<sup>15</sup>
812+
and an upper bound of at least 2<sup>15</sup>-1
813+
(the range of a signed 2-byte int).
814+
They may support higher ranges.
815+
If a range is specified with a bound greater than the implementation's supported bounds,
816+
it must be treated as specifying the implementation's maximum supported bound.
788817

789818

790819
<h3 id='counter-style-width'>
791-
Constant-width Representations: the 'width' descriptor</h3>
820+
Zero-Padding and Constant-Width Representations: the 'width' descriptor</h3>
792821

793822
<table class='descdef'>
794823
<tr>

0 commit comments

Comments
 (0)