@@ -268,10 +268,28 @@ Style Containment</h3>
268268 except the scoping element itself is counted as "outside" the tree,
269269 like the rest of the document.
270270
271- For example, if 'counter-increment' is scoped to an element,
271+ When scoped, the 'counter-set' and 'counter-increment' <a spec=css-lists-3>create a new counter</a> .
272+
273+ <div class=example>
274+ If 'counter-increment' is scoped to an element,
272275 the first use of it within the subtree acts as if the named counter were set to 0 at the scoping element,
273276 regardless of whether the counter had been used outside the scoping element.
274277 Any increments made within the subtree have no effect on counters of the same name outside the scoping element.
278+ Therefore, the following code results in <code> 1.2</code> being displayed:
279+ <pre><code highlight=markup>
280+ <div></div>
281+ </code></pre>
282+ <pre><code highlight=css>
283+ div {
284+ contain: style;
285+ counter-increment: n;
286+ }
287+ div::before {
288+ counter-increment: n 2;
289+ content: counters(n, '.' );
290+ }
291+ </code></pre>
292+ </div>
275293
276294 Possible optimizations that can be enabled by <a>style containment</a> include (but are not limited to):
277295
@@ -412,6 +430,7 @@ This appendix is <em>informative</em>.
412430 <li> Move the interaction between containment and the <code> bookmark-*</code> and <code> string-set</code> properties to [[CSS-CONTENT-3]]
413431 <li> Remove the effects of style containment on the "break-*" properties.
414432 <li> Move the description of the effects of containement on regions from this specification to [[CSS-REGIONS-1]] .
433+ <li> Clarify the effects of style scoping on counter-set and counter-increment
415434</ul>
416435
417436<h3 id="2017-04-19-changes">Changes from the
0 commit comments