Skip to content

Commit 53a98d6

Browse files
committed
Make the cascading behavior of @counter-style slightly clearer.
1 parent 9746816 commit 53a98d6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

css3-lists/Overview.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,10 @@ <h2 id=counter-style><span class=secno>8. </span> Defining Custom Counter
14791479
declaration "wins": first, they are compared by origin, with author rules
14801480
beating user rules, and user rules beating UA rules; second, they are
14811481
compared by document order, with later rules beating earlier rules.
1482+
&lsquo;<code class=css>@counter-style</code>&rsquo; rules cascade
1483+
"atomically" - if one replaces another of the same name, it replaces it
1484+
<em>entirely</em>, rather than just replacing the specific descriptors it
1485+
specifies.
14821486

14831487
<p>This at-rule conforms with the forward-compatible parsing requirement of
14841488
CSS; parsers may ignore these rules without error. Any descriptors that

css3-lists/Overview.src.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ <h2 id='counter-style'>
895895
multiple times in a given @counter-style rule, only the last specified value
896896
is used; all prior values for that descriptor must be ignored.</p>
897897

898-
<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>
898+
<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. ''@counter-style'' rules cascade "atomically" - if one replaces another of the same name, it replaces it <em>entirely</em>, rather than just replacing the specific descriptors it specifies.</p>
899899

900900
<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>
901901

0 commit comments

Comments
 (0)