Skip to content

Commit 1460d30

Browse files
committed
Rewrite the 'generating the value of the content property' section.
1 parent 277f149 commit 1460d30

2 files changed

Lines changed: 138 additions & 100 deletions

File tree

css3-lists/Overview.html

Lines changed: 94 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
158158
<code class=property>list-style</code>’ shorthand property</a>
159159

160160
<li><a href="#marker-pseudo-element"><span class=secno>6. </span> Markers:
161-
The <code class=css>::marker</code> pseudo-element</a>
161+
The <code class=css>::marker</code> pseudo-element</a>
162162
<ul class=toc>
163163
<li><a href="#content-property"><span class=secno>6.1. </span>
164-
Generating the computed value of the ‘<code
165-
class=property>content</code>property</a>
164+
Generating the value of the ‘<code class=property>content</code>
165+
property</a>
166166
</ul>
167167

168168
<li><a href="#positioning-markers"><span class=secno>7. </span>
@@ -484,24 +484,26 @@ <h2 id=marker-content><span class=secno>3. </span> Default Marker Contents:
484484

485485
<p> The ‘<a href="#list-style-type"><code
486486
class=property>list-style-type</code></a>’ property specifies an image
487-
that will be used as the list marker's <i>default contents</i>. The values
488-
are defined as follows:
487+
that will be used as the list marker's <a
488+
href="#default-contents"><i>default contents</i></a>. The values are
489+
defined as follows:
489490

490491
<dl>
491492
<dt><dfn id=list-style-image-image>&lt;image></dfn>
492493

493494
<dd> If the <a href="#list-style-image-image"><code>&lt;image></code></a>
494495
is not an <a
495496
href="http://www.w3.org/TR/css3-images/#invalid-image">invalid image</a>,
496-
the image is the <i>default contents</i> of the list item's marker.
497-
Otherwise, the <i>default contents</i> are given by ‘<a
497+
the image is the <a href="#default-contents"><i>default contents</i></a>
498+
of the list item's marker. Otherwise, the <a
499+
href="#default-contents"><i>default contents</i></a> are given by ‘<a
498500
href="#list-style-type"><code
499501
class=property>list-style-type</code></a>’ instead.
500502

501503
<dt><dfn id=list-style-image-none>none</dfn>
502504

503-
<dd> The <i>default contents</i> of the of the list item's marker are
504-
given by ‘<a href="#list-style-type"><code
505+
<dd> The <a href="#default-contents"><i>default contents</i></a> of the of
506+
the list item's marker are given by ‘<a href="#list-style-type"><code
505507
class=property>list-style-type</code></a>’ instead.
506508
</dl>
507509

@@ -570,27 +572,30 @@ <h2 id=marker-content><span class=secno>3. </span> Default Marker Contents:
570572
<dt><dfn id=list-style-type-string>&lt;string></dfn>
571573

572574
<dd> The <a href="#list-style-type-string"><code>&lt;string></code></a> is
573-
used as the list item's marker's <i>default contents</i>.
575+
used as the list item's marker's <a href="#default-contents"><i>default
576+
contents</i></a>.
574577

575578
<dt><dfn
576579
id=list-style-type-counter-style-name>&lt;counter-style-name></dfn>
577580

578581
<dd> If there is a counter style defined matching the <a
579582
href="#list-style-type-counter-style-name"><code>&lt;counter-style-name></code></a>,
580-
the list item's marker's <i>default contents</i> are that counter style.
581-
Otherwise, the list item's marker's <i>default contents</i> are ‘<a
582-
href="#list-style-type-none"><code class=css>none</code></a>’.
583+
the list item's marker's <a href="#default-contents"><i>default
584+
contents</i></a> are that counter style. Otherwise, the list item's
585+
marker's <a href="#default-contents"><i>default contents</i></a> are
586+
<a href="#list-style-type-none"><code class=css>none</code></a>’.
583587

584588
<dt><dfn id=list-style-type-symbols-function>&lt;symbols-function></dfn>
585589

586-
<dd> The list item's marker's <i>default contents</i> are the counter
587-
style represented by the <a
590+
<dd> The list item's marker's <a href="#default-contents"><i>default
591+
contents</i></a> are the counter style represented by the <a
588592
href="#type-symbols-function"><code>&lt;symbols-function></code></a>.
589593

590594
<dt><dfn id=list-style-type-none>none</dfn>
591595

592-
<dd> The list item's marker's <i>default contents</i> are ‘<a
593-
href="#list-style-type-none"><code class=css>none</code></a>’.
596+
<dd> The list item's marker's <a href="#default-contents"><i>default
597+
contents</i></a> are ‘<a href="#list-style-type-none"><code
598+
class=css>none</code></a>’.
594599
</dl>
595600

596601
<div class=example>
@@ -927,7 +932,7 @@ <h2 id=list-style-property><span class=secno>5. </span> The ‘<a
927932
<!-- ====================================================================== -->
928933

929934
<h2 id=marker-pseudo-element><span class=secno>6. </span> Markers: The
930-
<code class=css>::marker</code> pseudo-element</h2>
935+
<code class=css>::marker</code> pseudo-element</h2>
931936

932937
<p> This specification defines a new type of pseudo-element, the ‘<code
933938
class=css>::marker</code>’ pseudo-element, which is generated by <a
@@ -1122,57 +1127,68 @@ <h2 id=marker-pseudo-element><span class=secno>6. </span> Markers: The
11221127
</div>
11231128
<!-- ====================================================================== -->
11241129

1125-
<h3 id=content-property><span class=secno>6.1. </span> Generating the
1126-
computed value of the ‘<code class=property>content</code>’ property</h3>
1130+
<h3 id=content-property><span class=secno>6.1. </span> Generating the value
1131+
of the ‘<code class=property>content</code>’ property</h3>
11271132

1128-
<p>If a <code class=css>::marker</code> pseudo-element has its ‘<code
1129-
class=property>content</code>’ property set to ‘<code
1130-
class=css>normal</code>’, the computed value of the marker's ‘<code
1131-
class=property>content</code>’ property must be determined according to
1132-
the following algorithm:
1133+
<p> The ‘<code class=css>::marker</code>’ pseudo-element's ‘<code
1134+
class=property>content</code>’ property is set according to its <dfn
1135+
id=default-contents>default contents</dfn>, which are defined by the ‘<a
1136+
href="#list-style-image"><code
1137+
class=property>list-style-image</code></a>’ and ‘<a
1138+
href="#list-style-type"><code class=property>list-style-type</code></a>
1139+
properties:
11331140

1134-
<ol>
1135-
<li>If the computed value of ‘<a href="#list-style-image"><code
1136-
class=property>list-style-image</code></a>’ is a valid &lt;image>, then
1137-
the computed value of the ‘<code class=property>content</code>
1138-
property is that image.
1141+
<dl>
1142+
<dt>an &lt;image>
11391143

1140-
<li>Otherwise, if the computed value of ‘<a
1141-
href="#list-style-type"><code
1142-
class=property>list-style-type</code></a>’ is a &lt;string>, then the
1143-
computed value of the ‘<code class=property>content</code>’ property
1144-
is that string.
1144+
<dd> The computed value of the ‘<code class=property>content</code>
1145+
property is the computed value of the &lt;image>.
11451146

1146-
<li>Otherwise, if the computed value of ‘<a
1147-
href="#list-style-type"><code
1148-
class=property>list-style-type</code></a>’ is a valid
1149-
<i>&lt;counter-style></i>, then the computed value of the ‘<code
1150-
class=property>content</code>’ property is <code>&lt;counter-prefix>
1151-
counter(list-item, &lt;counter-style>) &lt;counter-suffix></code>, where
1147+
<dt>a &lt;string>
1148+
1149+
<dd> The computed value of the ‘<code class=property>content</code>
1150+
property is the &lt;string>.
1151+
1152+
<dt>a &lt;counter-style>
1153+
1154+
<dd> The computed value of the ‘<code class=property>content</code>
1155+
property is <code>&lt;counter-prefix> counter(list-item,
1156+
&lt;counter-style>) &lt;counter-suffix></code>, where
11521157
<i>&lt;counter-prefix></i> and <i>&lt;counter-suffix></i> are the values
11531158
of the <a href="#prefix"><i title=counter-prefix>prefix</i></a> and <a
11541159
href="#suffix"><i title=counter-suffix>suffix</i></a> descriptors for the
11551160
counter style.
11561161

1157-
<li>Otherwise the computed value is ‘<a
1158-
href="#list-style-type-none"><code class=css>none</code></a>’.
1159-
</ol>
1162+
<dt><code class=css title="">‘none’</code>
1163+
1164+
<dd> The computed value of the ‘<code class=property>content</code>
1165+
property is <code class=css title="">‘none’</code>.
1166+
</dl>
1167+
1168+
<p> If the computed value of ‘<code class=property>content</code>’ was
1169+
an <a href="#list-style-image-image"><code>&lt;image></code></a>, and it
1170+
ends up resolving to an <a
1171+
href="http://www.w3.org/TR/css3-images/#invalid-image">invalid image</a>,
1172+
the used value of the ‘<code class=property>content</code>’ property
1173+
is as above, but with the <a href="#default-contents"><i>default
1174+
contents</i></a> determined solely by ‘<a href="#list-style-type"><code
1175+
class=property>list-style-type</code></a>’.
11601176

11611177
<div class=example>
1162-
<p>Given the following style sheet:
1178+
<p> Given the following style sheet:
11631179

1164-
<pre>
1165-
li { display: list-item; list-style-type: decimal /* initial value */; }
1166-
li<code
1167-
class=css>::marker</code> { content: normal /* initial value */; }</pre>
1180+
<pre><!--
1181+
-->li { display: list-item; list-style-type: decimal /* initial value */; }
1182+
<!--
1183+
-->li::marker { content: normal /* initial value */; }</pre>
11681184

1169-
<p>And the following document fragment:
1185+
<p> And the following document fragment:
11701186

11711187
<pre>&lt;li>List Item&lt;/li></pre>
11721188

1173-
<p>The computed value of the ‘<code class=property>content</code>
1174-
property on the <code class=css>::marker</code> pseudo-element of the
1175-
list item element is:
1189+
<p> The computed value of the ‘<code class=property>content</code>
1190+
property on the <code class=css>::marker</code> pseudo-element of
1191+
the <code>&lt;li></code> is:
11761192

11771193
<pre>counter(list-item, decimal) "."</pre>
11781194
</div>
@@ -1186,8 +1202,8 @@ <h2 id=positioning-markers><span class=secno>7. </span> Positioning Markers</h2>
11861202
this new value.
11871203

11881204
<p>The new positioning scheme defined in this section can be used on all
1189-
elements, not just <code class=css>::marker</code> pseudo-elements. In
1190-
some situations, such as legal proceedings or official minutes, the
1205+
elements, not just <code class=css>::marker</code> pseudo-elements.
1206+
In some situations, such as legal proceedings or official minutes, the
11911207
precise form that the list marker takes is a vital part of the content.
11921208
It's not acceptable for the marker to change (from a custom-defined marker
11931209
to a default bullet or alpha marker) just because the UA is not rendering
@@ -1391,15 +1407,15 @@ <h3 id=marker-attachment><span class=secno>7.2. </span> The ‘<a
13911407
href="#marker-attachment0"><code
13921408
class=property>marker-attachment</code></a>’ property</h3>
13931409

1394-
<p>By default, elements or <code class=css>::marker</code> pseudo-elements
1395-
with ‘<code class=css>position:marker</code>’ position themselves
1396-
according to their list item's directionality. However, if the list item
1397-
is grouped with several other list items which may have different
1398-
directionality (for example, multiple &lt;li>s with different "dir"
1399-
attributes in an &lt;ol> in HTML), it is sometimes more useful to have all
1400-
the markers line up on one side, so the author can specify a single
1401-
"gutter" on that side and be assured that all the markers will lie in that
1402-
gutter and be visible. The ‘<a href="#marker-attachment0"><code
1410+
<p>By default, elements or <code class=css>::marker</code>
1411+
pseudo-elements with ‘<code class=css>position:marker</code>’ position
1412+
themselves according to their list item's directionality. However, if the
1413+
list item is grouped with several other list items which may have
1414+
different directionality (for example, multiple &lt;li>s with different
1415+
"dir" attributes in an &lt;ol> in HTML), it is sometimes more useful to
1416+
have all the markers line up on one side, so the author can specify a
1417+
single "gutter" on that side and be assured that all the markers will lie
1418+
in that gutter and be visible. The ‘<a href="#marker-attachment0"><code
14031419
class=property>marker-attachment</code></a>’ property defined in this
14041420
section allows an author to control this, switching list items to
14051421
positioning their markers based off the list container's directionality
@@ -2088,9 +2104,9 @@ <h2 id=counter-style><span class=secno>10. </span> Defining Custom Counter
20882104
string returned by the counter() or counters() functions. Instead, the
20892105
prefix and suffix are added by the algorithm that constructs the computed
20902106
value of the ‘<code class=property>contents</code>’ property for the
2091-
<code class=css>::marker</code> pseudo-element. This also implies that the
2092-
prefix and suffix always come from the specified counter-style, even if
2093-
the actual representation is constructed by a fallback style.
2107+
<code class=css>::marker</code> pseudo-element. This also implies
2108+
that the prefix and suffix always come from the specified counter-style,
2109+
even if the actual representation is constructed by a fallback style.
20942110

20952111
<p>The general form of an ‘<code class=css>@counter-style</code>’ rule
20962112
is:
@@ -2704,8 +2720,8 @@ <h3 id=counter-style-prefix><span class=secno>10.3. </span> Symbols before
27042720
<p>The ‘<a href="#descdef-prefix"><code
27052721
class=property>prefix</code></a>’ descripter specifies a string that is
27062722
prepended to the marker representation. Prefixes are only added by the
2707-
algorithm for constructing the default contents of the <code
2708-
class=css>::marker</code> pseudo-element; the prefix is not added
2723+
algorithm for constructing the default contents of the <code
2724+
class=css>::marker</code> pseudo-element; the prefix is not added
27092725
automatically when the counter() or counters() functions are used.
27102726
Prefixes are added to the representation after negative signs.
27112727

@@ -2734,8 +2750,8 @@ <h3 id=counter-style-suffix><span class=secno>10.4. </span> Symbols after
27342750
<p>The ‘<a href="#descdef-suffix"><code
27352751
class=property>suffix</code></a>’ descripter specifies a string that is
27362752
appended to the marker representation. Suffixes are only added by the
2737-
algorithm for constructing the default contents of the <code
2738-
class=css>::marker</code> pseudo-element; the suffix is not added
2753+
algorithm for constructing the default contents of the <code
2754+
class=css>::marker</code> pseudo-element; the suffix is not added
27392755
automatically when the counter() or counters() functions are used.
27402756
Suffixes are added to the representation after negative signs.
27412757

@@ -3319,7 +3335,8 @@ <h2 class=no-num id=profiles> Profiles</h2>
33193335
class=property>lower-alpha</code></a>’, ‘<a href="#upper-alpha"><code
33203336
class=property>upper-alpha</code></a>’, ‘<a
33213337
href="#list-style-type-none"><code class=property>none</code></a>’). It
3322-
does not include the <code class=css>::marker</code> pseudo element.
3338+
does not include the ‘<code class=css>::marker</code>’ pseudo element.
3339+
33233340

33243341
<p>The Full profile contains everything.
33253342
<!-- ====================================================================== -->
@@ -3347,8 +3364,8 @@ <h2 class=no-num id=changes> Changes From CSS2.1</h2>
33473364
in this module when compared to CSS2.1.
33483365

33493366
<ol>
3350-
<li>The <code class=css>::marker</code> pseudo-element has been introduced
3351-
to allow styling of the list marker directly.
3367+
<li>The <code class=css>::marker</code> pseudo-element has been
3368+
introduced to allow styling of the list marker directly.
33523369

33533370
<li>The ‘<code class=css>marker</code>’ value for ‘<code
33543371
class=property>position</code>’ has been added, to allow elements in
@@ -3666,6 +3683,9 @@ <h2 class=no-num id=index>Index</h2>
36663683
<li>decimal-leading-zero, <a href="#decimal-leading-zero"
36673684
title=decimal-leading-zero><strong>12.</strong></a>
36683685

3686+
<li>default contents, <a href="#default-contents"
3687+
title="default contents"><strong>6.1.</strong></a>
3688+
36693689
<li>dice, <a href="#dice" title=dice><strong>10.1.6.</strong></a>
36703690

36713691
<li>disc, <a href="#disc" title=disc><strong>12.</strong></a>

0 commit comments

Comments
 (0)