Skip to content

Commit 1d7396a

Browse files
committed
[css-lists-3] Move example up closer to what it's illustrating.
1 parent 4b07a8d commit 1d7396a

1 file changed

Lines changed: 25 additions & 26 deletions

File tree

css-lists-3/Overview.bs

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -955,32 +955,6 @@ Creating and Inheriting Counters</h3>
955955
to |element counters|.
956956
</div>
957957

958-
<div algorithm>
959-
[=Counters=] are [=instantiated=] when named in 'counter-reset',
960-
and also when not otherwise present if named in
961-
'counter-increment', 'counter-set', or the ''counter()'' or ''counters()'' notations.
962-
(Newly [=instantiated=] [=counters=] replace identically-named [=counters=] originating from previous siblings,
963-
but are added in addition to identically-named [=counters=] originating from ancestor elements,
964-
see [[#nested-counters]].)
965-
To <dfn local-lt="instantiate">instantiate a counter</dfn>
966-
of a given |name|
967-
on an |element|
968-
with a starting |value|:
969-
970-
1. Let |counters| be |element|’s [=CSS counters set=].
971-
972-
2. Let |innermost counter| be the last [=counter=] in |counters|
973-
with the name |name|.
974-
If |innermost counter|’s originating element
975-
is |element| or a previous sibling of |element|,
976-
[=set/remove=] |innermost counter| from |counters|.
977-
978-
3. [=set/Append=] a new [=counter=] to |counters|
979-
with name |name|,
980-
originating element |element|,
981-
and initial value |value|
982-
</div>
983-
984958
<div class='example' id='counter-inheritance-example'>
985959
Take the following code as an example:
986960

@@ -1032,6 +1006,31 @@ Creating and Inheriting Counters</h3>
10321006
#counter-inheritance-example b.baz { color: blue; }
10331007
</style>
10341008

1009+
<div algorithm>
1010+
[=Counters=] are [=instantiated=] when named in 'counter-reset',
1011+
and also when not otherwise present if named in
1012+
'counter-increment', 'counter-set', or the ''counter()'' or ''counters()'' notations.
1013+
(Newly [=instantiated=] [=counters=] replace identically-named [=counters=] originating from previous siblings,
1014+
but are added in addition to identically-named [=counters=] originating from ancestor elements,
1015+
see [[#nested-counters]].)
1016+
To <dfn local-lt="instantiate">instantiate a counter</dfn>
1017+
of a given |name|
1018+
on an |element|
1019+
with a starting |value|:
1020+
1021+
1. Let |counters| be |element|’s [=CSS counters set=].
1022+
1023+
2. Let |innermost counter| be the last [=counter=] in |counters|
1024+
with the name |name|.
1025+
If |innermost counter|’s originating element
1026+
is |element| or a previous sibling of |element|,
1027+
[=set/remove=] |innermost counter| from |counters|.
1028+
1029+
3. [=set/Append=] a new [=counter=] to |counters|
1030+
with name |name|,
1031+
originating element |element|,
1032+
and initial value |value|
1033+
</div>
10351034

10361035
<h3 id='counters-without-boxes'>
10371036
Counters in elements that do not generate boxes</h3>

0 commit comments

Comments
 (0)