Skip to content

Commit e972118

Browse files
committed
[css2] addressed, in part issue 184, by adding dbaron's example
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402518
1 parent bfb131b commit e972118

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

css2/generate.src

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,22 @@ counters. (We assume the style sheet as given in the example above).
613613
</pre>
614614
</div>
615615

616+
<div class="example">
617+
<p>Another example, showing how scope works when counters are used on
618+
elements that are not tested, is the following. This shows how the
619+
style rules given above to number chapters and sections would apply to
620+
the markup given.
621+
622+
<pre>
623+
&lt;body> &lt;!-- (set chapter to 0 | -->
624+
&lt;h1>About the CSS 2.1 Specification&lt;/h1> &lt;!-- increment chapter (=1) | (set section to 0 -->
625+
&lt;h2>CSS 2.1 vs CSS 2&lt;/h2> &lt;!-- | increment section (=1) -->
626+
&lt;h2>Reading the specification&lt;/h 2> &lt;!-- | increment section (=2) -->
627+
&lt;h1>Introduction to CSS 2.1&lt;/h1> &lt;!-- increment chapter (=2) | )(set section to 0 -->
628+
&lt;/body> &lt;!-- | ) -->
629+
</pre>
630+
</div>
631+
616632
<p>The 'counters()' function generates a string composed of all of the
617633
counters with the same name that are in scope, separated by a given
618634
string.

0 commit comments

Comments
 (0)