Skip to content

Commit 5e7350b

Browse files
committed
[css-lists-3] Add example of manipulating list-item counter.
1 parent a47e9aa commit 5e7350b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

css-lists-3/Overview.bs

+15-1
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ Manipulating Counters: the 'counter-increment', 'counter-set' and 'counter-reset
786786
</div>
787787

788788
<h3 id="list-item-counter">
789-
The special ''list-item'' counter</h3>
789+
The Implicit ''list-item'' Counter</h3>
790790

791791
<a>List items</a> automatically increment
792792
a special <dfn value for="counter-increment, counter-set, counter-reset, counter(), counters()">list-item</dfn> <a>counter</a>.
@@ -796,6 +796,20 @@ The special ''list-item'' counter</h3>
796796
at the same time that <a>counters</a> are normally incremented.
797797
(This has no effect on the computed values of the 'counter-*' properties.)
798798

799+
<div class="example">
800+
In the following example,
801+
the list is modified to count by twos:
802+
<pre>
803+
ol.evens { counter-increment: list-item 2; }
804+
</pre>
805+
A three-item list would be rendered as
806+
<pre>
807+
2. First Item
808+
4. Second Item
809+
6. Third Item
810+
</pre>
811+
</div>
812+
799813
Issue: More definition.
800814
See old <a href="https://github.com/w3c/csswg-drafts/issues/2464#issuecomment-375492907">WG discussions</a>
801815
and newer <a href="https://github.com/w3c/csswg-drafts/issues/3686">issue discussion</a>.

0 commit comments

Comments
 (0)