Skip to content

Commit d1828fe

Browse files
committed
[css-counter-styles-3] Whoops, previous edit was wrong. Just catch the 0-value case directly. w3c#5784
1 parent 4055049 commit d1828fe

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

css-counter-styles-3/Overview.bs

+11-3
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,20 @@ Accumulating Numerals: the ''additive'' system</h4>
640640
|S| initially be the empty string,
641641
and |symbol list| initially be the list of <a>additive tuples</a>.
642642

643-
2. If |value| is 0, and there is an <a>additive tuple</a> with a weight of 0, append that tuple's <a>counter symbol</a> to |S| and return |S|.
643+
2. If |value| is zero:
644+
645+
1. If |symbol list| contains a tuple with a weight of zero,
646+
append that tuple's <a>counter symbol</a> to |S| and return |S|.
647+
648+
2. Otherwise, the given counter value cannot be represented by this counter style,
649+
and must instead be represented by the fallback counter style.
644650

645651
3. For each |tuple| in |symbol list|:
646652

647653
1. Let |symbol| and |weight| be |tuple|'s [=counter symbol=] and weight, respectively.
648654

649-
2. If |weight| is zero, [=iteration/continue=].
655+
2. If |weight| is zero, or |weight| is greater than |value|,
656+
[=iteration/continue=].
650657

651658
3. Let |reps| be <code>floor( |value| / |weight| )</code>.
652659

@@ -658,7 +665,8 @@ Accumulating Numerals: the ''additive'' system</h4>
658665

659666
4. Assertion: |value| is still non-zero.
660667

661-
The given counter value cannot be represented by this counter style, and must instead be represented by the fallback counter style.
668+
The given counter value cannot be represented by this counter style,
669+
and must instead be represented by the fallback counter style.
662670
</div>
663671

664672
Note: All of the predefined additive ''@counter-style'' rules in this specification

0 commit comments

Comments
 (0)