Skip to content

Commit 2cf651d

Browse files
authored
[css-counter-styles-3] Explicitly tell when the counter style is not defined (#11896)
@counter-style does not define a counter style (but is still a valid rule) when some descriptors are declared with a valid value that do not meet the requirement of the declared (or default) system.
1 parent 123c371 commit 2cf651d

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

css-counter-styles-3/Overview.bs

+15-8
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ Cycling Symbols: the ''cyclic'' system</h4>
272272
the second <a>counter symbol</a> (if it exists) is used as the representation of the value 2, etc.
273273

274274
If the system is ''cyclic'',
275-
the '@counter-style/symbols' descriptor must contain at least one <a>counter symbol</a>.
275+
the '@counter-style/symbols' descriptor must contain at least one <a>counter symbol</a>,
276+
otherwise the rule does not define a counter style (but is still a valid rule).
276277
This system is defined over all counter values.
277278

278279
<div class=example>
@@ -321,7 +322,8 @@ Exhaustible Symbols: the ''system/fixed'' system</h4>
321322
such as circled digits.
322323

323324
If the system is ''system/fixed'',
324-
the '@counter-style/symbols' descriptor must contain at least one <a>counter symbol</a>.
325+
the '@counter-style/symbols' descriptor must contain at least one <a>counter symbol</a>,
326+
otherwise the rule does not define a counter style (but is still a valid rule).
325327
This system is defined over counter values in a finite range,
326328
starting with the <a>first symbol value</a> and having a length equal to the length of the list of <a>counter symbols</a>.
327329

@@ -381,7 +383,8 @@ Repeating Symbols: the ''symbolic'' system</h4>
381383
and is also sometimes used for alphabetic-style lists for a slightly different presentation than what the ''system/alphabetic'' system presents.
382384

383385
If the system is ''symbolic'',
384-
the '@counter-style/symbols' descriptor must contain at least one <a>counter symbol</a>.
386+
the '@counter-style/symbols' descriptor must contain at least one <a>counter symbol</a>,
387+
otherwise the rule does not define a counter style (but is still a valid rule).
385388
This system is defined only over strictly positive counter values.
386389

387390
<div class=example>
@@ -469,7 +472,8 @@ Bijective Numerals: the ''alphabetic'' system</h4>
469472
and so on.
470473

471474
If the system is ''system/alphabetic'',
472-
the '@counter-style/symbols' descriptor must contain at least two <a>counter symbols</a>.
475+
the '@counter-style/symbols' descriptor must contain at least two <a>counter symbols</a>,
476+
otherwise the rule does not define a counter style (but is still a valid rule).
473477
This system is defined only over strictly positive counter values.
474478

475479
<div class=example>
@@ -541,7 +545,8 @@ Positional Numerals: the ''numeric'' system</h4>
541545
and so on.
542546

543547
If the system is ''system/numeric'',
544-
the '@counter-style/symbols' descriptor must contain at least two <a>counter symbols</a>.
548+
the '@counter-style/symbols' descriptor must contain at least two <a>counter symbols</a>,
549+
otherwise the rule does not define a counter style (but is still a valid rule).
545550
This system is defined over all counter values.
546551

547552
<div class=example>
@@ -612,7 +617,8 @@ Accumulating Numerals: the ''additive'' system</h4>
612617
and other numbering systems around the world.
613618

614619
If the system is ''additive'',
615-
the '@counter-style/additive-symbols' descriptor must contain at least one <a>additive tuple</a>.
620+
the '@counter-style/additive-symbols' descriptor must contain at least one <a>additive tuple</a>,
621+
otherwise the rule does not define a counter style (but is still a valid rule).
616622
This system is nominally defined over all counter values
617623
(see algorithm, below, for exact details).
618624

@@ -709,7 +715,8 @@ Building from Existing Counter Styles: the ''extends'' system
709715
rather than taking their initial values.
710716

711717
If a ''@counter-style'' uses the ''extends'' system,
712-
it must not contain a '@counter-style/symbols' or '@counter-style/additive-symbols' descriptor.
718+
it must not contain a '@counter-style/symbols' or '@counter-style/additive-symbols' descriptor,
719+
otherwise the rule does not define a counter style (but is still a valid rule).
713720

714721
If the specified <<counter-style-name>> is an [=ASCII case-insensitive=] match
715722
for ''disc'', ''circle'', ''square'', ''disclosure-open'', or ''disclosure-closed''
@@ -2615,7 +2622,7 @@ The <code>CSSCounterStyleRule</code> interface</h3>
26152622
1. [=CSS/parse=] [=the given value=] as the descriptor associated with the attribute.
26162623

26172624
2. If the result is invalid according to the given descriptor's grammar,
2618-
or would cause the ''@counter-style'' rule to become invalid,
2625+
or would cause the ''@counter-style'' rule to not define a counter style,
26192626
do nothing and abort these steps.
26202627
(For example, some systems require the '@counter-style/symbols' descriptor to contain two values.)
26212628

0 commit comments

Comments
 (0)