Skip to content

Commit ff3be64

Browse files
committed
[css-counter-styles] Abstract the list of non-overrideable counter-style names and use it directly. w3c#8186
1 parent de46513 commit ff3be64

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

css-counter-styles-3/Overview.bs

+14-10
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,15 @@ Defining Custom Counter Styles: the ''@counter-style'' rule</h2>
163163

164164
<dfn>&lt;counter-style-name></dfn> is a <<custom-ident>>
165165
that is not an <a>ASCII case-insensitive</a> match for ''list-style-type/none''.
166+
When used here, to define a counter style,
167+
it also cannot be any of the [=non-overrideable counter-style names=]
168+
(in other uses that merely reference a counter style,
169+
such as the ''extend'' system,
170+
these are allowed).
166171
The <<counter-style-name>> is a [=tree-scoped name=].
167172

168-
The keywords ''decimal'', ''disc'', ''square'', ''circle'', ''disclosure-open'', and ''disclosure-closed''
169-
are valid <<counter-style-name>>s,
170-
but are invalid when used here to name a counter style rule;
171-
doing so makes the rule invalid.
172-
(They can be used in other contexts, such as in the ''extend'' system.)
173+
The <dfn>non-overrideable counter-style names</dfn> are
174+
the keywords ''decimal'', ''disc'', ''square'', ''circle'', ''disclosure-open'', and ''disclosure-closed''.
173175

174176
Note: Note that <<custom-ident>> also automatically excludes the <a spec=css-values>CSS-wide keywords</a>.
175177
In addition, some names, like ''inside'',
@@ -2574,14 +2576,16 @@ The <code>CSSCounterStyleRule</code> interface</h3>
25742576

25752577
On setting the <var>name</var> attribute, run the following steps:
25762578

2577-
1. If the value is an <a>ASCII case-insensitive</a> match
2579+
1. If the value is an [=ASCII case-insensitive=] match
2580+
for "none"
2581+
or one of the [=non-overrideable counter-style names=],
2582+
do nothing and return.
2583+
2584+
2. If the value is an <a>ASCII case-insensitive</a> match
25782585
for any of the predefined <a>counter styles</a>,
25792586
lowercase it.
25802587

2581-
2. If the value is not "decimal", "disc", or "none",
2582-
replace the associated rule's name with an <a>identifier</a> equal to the value.
2583-
2584-
3. Otherwise, do nothing.
2588+
3. Replace the associated rule's name with an <a>identifier</a> equal to the value.
25852589

25862590
<dt><dfn>system</dfn>
25872591
<dt><dfn>symbols</dfn>

0 commit comments

Comments
 (0)