33<head>
44<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
55<title>Generated content, automatic numbering, and lists</title>
6- <!-- Changed by Kimberly Blessing, 2004-02-13 -->
76</head>
87<body>
98<h1 align="center">
@@ -199,7 +198,7 @@ class="value-inst-no-open-quote"><strong>no-open-quote</strong></span></span>
199198and <span class="index-inst" title="no-close-quote"><span
200199class="value-inst-no-close-quote"><strong>no-close-quote</strong></span></span>
201200
202- <dd>Same as 'none' , but increments (decrements) the level of nesting for quotes.
201+ <dd>Introduces no content , but increments (decrements) the level of nesting for quotes.
203202
204203<dt><span class="index-def" title="attr()"><strong>attr(X)</strong></span>
205204<dd>This function returns as a string the value of attribute X
@@ -212,8 +211,7 @@ attribute values for other elements than the subject of the selector.
212211</dl>
213212
214213<P>The <span class="propinst-display">'display'</span> property
215- controls whether the content is placed in a block, inline, or marker
216- box.
214+ controls whether the content is placed in a block or inline box.
217215
218216<div class="example"><p>The following rule causes the string "Chapter: " to be generated before each H1 element:</p>
219217
@@ -456,12 +454,6 @@ one optionally followed by an integer. The integer gives the value that
456454the counter is set to on each occurrence of the element. The default
457455is 0.
458456
459- <p>If <span
460- class="propinst-counter-increment">'counter-increment'</span> refers
461- to a counter that is not in the <a href="#scope">scope (see below</a>) of any
462- <span class="propinst-counter-reset">'counter-reset'</span>, the
463- counter is assumed to have been reset to 0 by the root element.
464-
465457<div class="example">
466458<p>This example shows a way to number chapters and sections with
467459"Chapter 1", "1.1", "1.2", etc.
@@ -505,11 +497,12 @@ H1 { counter-reset: section -1 imagenum 99 }
505497
506498<h3><a name="scope">Nested counters and scope</a></h3>
507499
508- <p>Counters are "self-nesting", in the sense that re-using a counter
509- in a child element automatically creates a new instance of the
510- counter. This is important for situations like lists in HTML, where
511- elements can be nested inside themselves to arbitrary depth. It would
512- be impossible to define uniquely named counters for each level.
500+ <p>Counters are "self-nesting", in the sense that resetting a counter
501+ in a descendant element automatically creates a new instance of
502+ the counter. This is important for situations like lists in HTML,
503+ where elements can be nested inside themselves to arbitrary depth.
504+ It would be impossible to define uniquely named counters for each
505+ level.
513506
514507<div class="example">
515508<p>Thus, the following suffices to number nested list items. The
@@ -523,12 +516,18 @@ LI:before { content: counter(item) ". "; counter-increment: item }
523516</pre>
524517</div>
525518
526- <p>The self-nesting is based on the principle that every element that
527- has a <span class="propinst-counter-reset">'counter-reset'</span> for
528- a counter X, creates a fresh counter X, the <span class="index-def"
529- title="scope"><dfn>scope</dfn></span> of which is the element, its
530- following siblings, and all the descendants of the element and its
531- following siblings.
519+ <p>The <span class="index-def" title="scope"><dfn>scope</dfn></span>
520+ of a counter starts at the first element in the document that has a
521+ <span class="propinst-counter-reset">'counter-reset'</span> for that
522+ counter and includes the element's descendants and its following
523+ siblings with their descendants.
524+
525+ <p>If <span
526+ class="propinst-counter-increment">'counter-increment'</span> or <span
527+ class="propinst-content">'content'</span> refers to a counter that is
528+ not in the scope of any <span
529+ class="propinst-counter-reset">'counter-reset'</span>, the counter is
530+ assumed to have been reset to 0 by the root element.
532531
533532<p>In the example above, an OL will create a counter, and all children
534533of the OL will refer to that counter.
@@ -549,24 +548,25 @@ counters. (We assume the style sheet as given in the example above).
549548 <LI>item <!-- increment item[1] (= 3) -->
550549 <OL> <!-- (set item[2] to 0 -->
551550 <LI>item <!-- increment item[2] (= 1) -->
552- </OL> <!-- ) -->
553- <OL> <!-- ( set item[3 ] to 0 -->
554- <LI> <!-- increment item[3 ] (= 1) -->
551+ </OL> <!-- -->
552+ <OL> <!-- set item[2 ] to 0 -->
553+ <LI>item <!-- increment item[2 ] (= 1) -->
555554 </OL> <!-- ) -->
556555 <LI>item <!-- increment item[1] (= 4) -->
557556 </OL> <!-- ) -->
558557 <LI>item <!-- increment item[0] (= 3) -->
559558 <LI>item <!-- increment item[0] (= 4) -->
560- </OL> <!-- ) -->
561- <OL> <!-- ( reset item[4 ] to 0 -->
562- <LI>item <!-- increment item[4 ] (= 1) -->
563- <LI>item <!-- increment item[4 ] (= 2) -->
564- </OL> <!-- ) -->
559+ </OL> <!-- -->
560+ <OL> <!-- reset item[0 ] to 0 -->
561+ <LI>item <!-- increment item[0 ] (= 1) -->
562+ <LI>item <!-- increment item[0 ] (= 2) -->
563+ </OL> <!-- -->
565564</pre>
566565</div>
567566
568- <p>The 'counters()' function generates a string composed of
569- the values of all counters with the same name, separated by a given string.
567+ <p>The 'counters()' function generates a string composed of the values
568+ of all counters with the same name on the element and its ancestors,
569+ separated by a given string.
570570
571571<div class="example"><P>
572572<P>The following style sheet numbers nested list items
0 commit comments