Skip to content

Commit 894742a

Browse files
committed
Define the scope of @counter-style rules and the conflict resolution algorithm.
1 parent 650aa35 commit 894742a

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

css3-lists/Overview.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,14 @@ <h2 id=counter-style><span class=secno>8. </span> Defining Custom Counter
14821482
@counter-style rule, only the last specified value is used; all prior
14831483
values for that descriptor must be ignored.
14841484

1485+
<p>Defining a &lsquo;<code class=css>@counter-style</code>&rsquo; must make
1486+
it available to the entire document in which it is included. If multiple
1487+
&lsquo;<code class=css>@counter-style</code>&rsquo; rules are defined with
1488+
the same name, standard cascade rules must be used to determine which
1489+
declaration "wins": first, they are compared by origin, with author rules
1490+
beating user rules, and user rules beating UA rules; second, they are
1491+
compared by document order, with later rules beating earlier rules.
1492+
14851493
<p>This at-rule conforms with the forward-compatible parsing requirement of
14861494
CSS; parsers may ignore these rules without error. Any descriptors that
14871495
are not recognized or implemented by a given user agent must be ignored.

css3-lists/Overview.src.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,8 @@ <h2 id='counter-style'>
902902
multiple times in a given @counter-style rule, only the last specified value
903903
is used; all prior values for that descriptor must be ignored.</p>
904904

905+
<p>Defining a ''@counter-style'' must make it available to the entire document in which it is included. If multiple ''@counter-style'' rules are defined with the same name, standard cascade rules must be used to determine which declaration "wins": first, they are compared by origin, with author rules beating user rules, and user rules beating UA rules; second, they are compared by document order, with later rules beating earlier rules.</p>
906+
905907
<p>This at-rule conforms with the forward-compatible parsing requirement of CSS; parsers may ignore these rules without error. Any descriptors that are not recognized or implemented by a given user agent must be ignored. The <i>&lt;counter-style-name></i> must be be a valid identifier and must not be "decimal", "default", "inherit", "initial", "inside", "none", or "outside"; otherwise the @counter-style is invalid and must be ignored.</p>
906908

907909
<h3 id='counter-style-type'>

0 commit comments

Comments
 (0)