You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2 id="inserting-replacing-content">Inserting and replacing content with the 'content' property</h2>
80
+
<h2 id="content-property">Inserting and replacing content with the 'content' property</h2>
81
81
82
82
<pre class='propdef'>
83
83
Name: content
@@ -120,30 +120,36 @@ See sections below for details on each of these.
120
120
121
121
</dl>
122
122
123
-
Issue: should the contents keyword be replaced with ''content()''
123
+
Issue: Should the contents keyword be replaced with ''content()''?
124
124
125
125
126
126
127
127
128
128
129
-
<p id="replacedContent">If the computed value of the part of the 'content' property that ends up being used is a single URI, then the element or pseudo-element is a replaced element. The box model defines different rules for the layout of replaced elements than normal elements. Replaced elements do not have '::before' and '::after' pseudo-elements; the 'content' property in the case of replaced content replaces the entire contents of the element's box.
129
+
<p id="replaced">If the computed value of the part of the 'content' property that ends up being used is a single URI, then the element or pseudo-element is a replaced element. The box model defines different rules for the layout of replaced elements than normal elements. Replaced elements do not have '::before' and '::after' pseudo-elements; the 'content' property in the case of replaced content replaces the entire contents of the element's box.
130
130
131
-
<h3 id="accessibility-of-generated-content">
131
+
<h3 id="accessibility">
132
132
Accessibility of Generated Content</h3>
133
133
134
-
Generated content should be searchable, selectable, and available to assistive technologies.
134
+
Generated content should be searchable, selectable, and available to assistive technologies.
135
+
The 'content' property applies to speech
136
+
and generated content must be rendered for speech output. [[!CSS3-SPEECH]]
135
137
136
138
Issue: Start work on an AAM for CSS.
137
139
138
-
Generated content often needs alternative text.
139
-
If the value of the content property is a string,
140
-
this string should be used by assistive technology
141
-
unless an alternative is provided. This allows
142
-
purely decorative text to be ignored by providing
143
-
the empty string as alternative text.
144
-
Appropriate alternative text must be provided for
145
-
images inserted via the content property as well.
140
+
<h3 id="alt">
141
+
Alternative Text for Speech</h3>
146
142
143
+
Content intended for visual media sometimes needs alternative text for speech output.
144
+
The 'content' property thus accepts alternative text
145
+
to be specified after a slash (''/'') after the last <<content-list>>.
146
+
If such alternative text is provided,
147
+
it must be used for speech output instead.
148
+
149
+
This allows, for example, purely decorative text to be elided in speech output
150
+
(by providing the empty string as alternative text),
151
+
and allows authors to provide more readable alternatives
152
+
to images, icons, or text-encoded symbols.
147
153
148
154
<!--examples from CSS-PSEUDO, redone with our new syntax-->
149
155
@@ -173,19 +179,15 @@ Accessibility of Generated Content</h3>
173
179
174
180
<!--end copy from CSS-PSEUDO-->
175
181
176
-
177
-
178
-
179
-
180
-
<h2 id="content-functions">
182
+
<h2 id="content-values">
181
183
Content Values and Functions</h2>
182
184
183
185
The 'content' property can be used to add many different types of content to a document,
184
186
including images, strings, the values of counters, and the text value of elements.
<p class="issue">There appears to be some change from [[CSS21]] which says, "If the user agent cannot display the resource it must either leave it out as if it were not specified or display some indication that the resource cannot be displayed." Are we now saying that a user agent cannot display a missing image graphic in this situation?
231
233
232
-
When a URI is used as replaced content, it <a href="#replacedContent">affects the generation</a> of ''::before'' and ''::after'' pseudo-elements.
234
+
When a URI is used as replaced content, it <a href="#replaced">affects the generation</a> of ''::before'' and ''::after'' pseudo-elements.
HTML has long had the <code>q</code> element, used to delimit quotations. The ''quotes'' property, in conjunction with the various *-quote values of the 'content' property, can be used to properly style such quotations.
298
300
299
301
300
-
<h4 id="specifying-quotes">
302
+
<h4 id="quotes-property">
301
303
Specifying quotes with the 'quotes' property</h4>
302
304
303
305
@@ -331,7 +333,7 @@ This property specifies quotation marks for any number of embedded quotations. V
331
333
</dl>
332
334
333
335
334
-
<h4 id="inserting-quotes">
336
+
<h4 id="quote-values">
335
337
The *-quote values of the content property
336
338
</h4>
337
339
@@ -347,10 +349,10 @@ The *-quote values of the content property
347
349
348
350
<dt><dfn>open-quote</dfn>
349
351
<dt><dfn>close-quote</dfn>
350
-
<dd>These values are replaced by the appropriate string from the 'quotes' property, and increments (decrements) the level of nesting for quotes. See [[#specifying-quotes]] for more information.
352
+
<dd>These values are replaced by the appropriate string from the 'quotes' property, and increments (decrements) the level of nesting for quotes. See [[#quotes-property]] for more information.
351
353
<dt><dfn>no-open-quote</dfn>
352
354
<dt><dfn>no-close-quote</dfn>
353
-
<dd>Inserts nothing (as in ''content/none''), but increments (decrements) the level of nesting for quotes. See [[#specifying-quotes]] for more information.
355
+
<dd>Inserts nothing (as in ''content/none''), but increments (decrements) the level of nesting for quotes. See [[#quotes-property]] for more information.
354
356
355
357
</dl>
356
358
@@ -477,7 +479,7 @@ Leaders</h3>
477
479
478
480
A leader, sometimes known as a tab leader or a dot leader, is a repeating pattern used to visually connect content across horizontal spaces. They are most commonly used in tables of contents, between titles and page numbers. The ''leader()'' function, as a value for the content property, is used to create leaders in CSS. This function takes a string (the leader string), which describes the repeating pattern for the leader.
479
481
480
-
<h4 id="content-leader-function">
482
+
<h4 id="leader-function">
481
483
The ''leader()'' function
482
484
</h4>
483
485
@@ -533,7 +535,7 @@ The ''leader()'' function
533
535
<p class="issue">
534
536
Do leaders depend on the assumption that the content after the leader is right-aligned (end-aligned)?
535
537
536
-
<h4 id="rendering-leaders">
538
+
<h4 id="leader-rules">
537
539
Rendering leaders
538
540
</h4>
539
541
@@ -548,7 +550,7 @@ Rendering leaders
548
550
<li>A leader only appears on a single line, even if the before content and after content are on different lines.
549
551
<li>A leader can’t be the only thing on a line.
550
552
</ol>
551
-
<h4 id="procedure-leader">
553
+
<h4 id="leader-alignment">
552
554
Procedure for rendering leaders
553
555
</h4>
554
556
<ol>
@@ -736,10 +738,10 @@ a::after { content: ", in the chapter entitled " target-text(attr(href url)) }
736
738
737
739
738
740
739
-
<h3 id="named-strings-heading">
741
+
<h3 id="named-strings">
740
742
Named strings</h3>
741
743
742
-
This section introduces <dfn>named strings</dfn>, which are the textual equivalent of counters and which have a distinct namespace from counters. Named strings follow the same nesting rules as counters. The 'string-set' property accepts values similar to the 'content' property, including the extraction of the current value of counters.
744
+
This section introduces <dfn lt="named string">named strings</dfn>, which are the textual equivalent of counters and which have a distinct namespace from counters. Named strings follow the same nesting rules as counters. The 'string-set' property accepts values similar to the 'content' property, including the extraction of the current value of counters.
743
745
744
746
Named strings are a convenient way to pull metadata out of the document for insertion into headers and footers. In HTML, for example, META elements contained in the document HEAD can set the value of named strings. In conjunction with attribute selectors, this can be a powerful mechanism:
745
747
@@ -770,7 +772,7 @@ head > title { string-set: title contents; }
<dfn>content()</dfn> = content( [text | before | after | first-letter | marker ]? )
@@ -983,7 +985,7 @@ Automatic counters and numbering: the 'counter-increment' and 'counter-reset' pr
983
985
984
986
985
987
986
-
<h2 id="css-bookmarks">
988
+
<h2 id="bookmark-generation">
987
989
Bookmarks
988
990
</h2>
989
991
Some document formats, most notably PDF, allow the use of <dfn>bookmarks</dfn> as an aid to navigation. Bookmarks provide a hierarchy of links to document elements, as well as text to label the links. A bookmark has three properties: 'bookmark-level', 'bookmark-label', and 'bookmark-state'.
@@ -1120,7 +1122,7 @@ Issue: is the initial bookmark state, or the bookmark state updated by the UA as
1120
1122
1121
1123
* Dave Cramer added as co-editor. Ian Hickson and Håkon Wium Lie are now former editors.
0 commit comments