Skip to content

Commit 4c6a411

Browse files
committed
[css-content] reorganizing away
1 parent a715c5a commit 4c6a411

1 file changed

Lines changed: 82 additions & 80 deletions

File tree

css-content/Overview.bs

Lines changed: 82 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,28 @@ See sections below for details on each of these.
138138
<h2 id="content-functions">
139139
Content Values and Functions</h2>
140140

141+
142+
<h3 id="content-string">
143+
String</h3>
144+
145+
<dl dfn-for="content, <content-list>" dfn-type=value>
146+
<dt><dfn><<string>></dfn>
147+
<dd>
148+
The element or pseudo-element contains the specified string. Occurrences of line-feed or space characters in the string are handled according to the properties given in the [[CSS3TEXT]] module.
149+
150+
If the value is the empty string, and the element or pseudo-element's 'display' property computes to anything but ''inline'', then the element or pseude-element contains an empty anonymous inline box, otherwise the element contains an empty string.
151+
152+
(This is a formal way of saying that an empty string is different from ''content/none'' in that it forces the creation of a line box, even if the line box would be empty.)
153+
154+
</dl>
155+
141156
<h3 id="content-uri">
142157
URI</h3>
143158

144-
<dl dfn-type=value dfn-for=content>
145-
<dt><<uri>></dt>
146-
<dd>For URIs other than URIs in the last comma separated section of the value, if the URI is available and the format is supported, then the element or pseudo-element becomes a replaced element, otherwise, the next item in the comma separated list is used, if any.
147-
148-
</dl>
159+
<dl dfn-type=value dfn-for=content>
160+
<dt><<uri>></dt>
161+
<dd>For URIs other than URIs in the last comma separated section of the value, if the URI is available and the format is supported, then the element or pseudo-element becomes a replaced element, otherwise, the next item in the comma separated list is used, if any.
162+
</dl>
149163

150164
<div class="example">
151165
<pre>
@@ -178,18 +192,7 @@ URI</h3>
178192
When a URI is used as replaced content, it <a href="#replacedContent">affects the generation</a> of ''::before'' and ''::after'' pseudo-elements.
179193

180194

181-
<h3 id="content-string">
182-
String</h3>
183-
184-
<dl dfn-for="content, <content-list>" dfn-type=value>
185-
<dt><dfn><<string>></dfn>
186-
<dd>The element or pseudo-element contains the specified string. Occurrences of line-feed or space characters in the string are handled according to the properties given in the [[CSS3TEXT]] module.
187-
188-
If the value is the empty string, and the element or pseudo-element's 'display' property computes to anything but ''inline'', then the element or pseude-element contains an empty anonymous inline box, otherwise the element contains an empty string.
189-
190-
(This is a formal way of saying that an empty string is different from ''content/none'' in that it forces the creation of a line box, even if the line box would be empty.)
191195

192-
</dl>
193196

194197

195198

@@ -240,94 +243,113 @@ contents</h3>
240243

241244
Note that while it is useless to include ''content/contents'' twice in a single 'content' property, that is not a parse error. The second occurrence simply has no effect, as it has already been used. It is also not a parse error to use it on a marker pseudo-element, it is only during the rendering stage that it gets treated like ''content/none''.
242245

243-
<p class="issue">Do we need the statement about marker pseudo-elements here? Or is this legacy from the old version of the spec?
246+
<p class="issue">Do we need the statement about marker pseudo-elements here? Or is this legacy from the old version of the spec?
244247

245248

246-
<!--start copy from CSS-PSEUDO-->
247249

248250

249251
<h3 id="inserting-quotes">
250252
Inserting quotes with the 'content' property
251253
</h3>
252254

253255

254-
<pre class="propdef partial">
255-
Name: content
256-
New values: open-quote | close-quote | no-open-quote | no-close-quote
257-
</pre>
258256

259-
<dl>
257+
<dl dfn-for="content, <content-list>" dfn-type=value>
260258

261259
<dt><dfn>open-quote</dfn> and <dfn>close-quote</dfn>
262260
<dd>These values are replaced by the appropriate string from the 'quotes' property. See [[#specifying-quotes]] for more information.
263261
<dt><dfn>no-open-quote</dfn> and <dfn>no-close-quote</dfn>
264262
<dd>Inserts nothing (as in ''content/none''), but increments (decrements) the level of nesting for quotes. See [[#specifying-quotes]] for more information.
265263

266-
</dl>
264+
</dl>
267265

268-
Quotation marks are inserted in appropriate places in a document with the ''open-quote'' and ''close-quote'' values of the 'content' property. Each occurrence of ''open-quote'' or ''close-quote'' is replaced by one of the strings from the value of 'quotes', based on the depth of nesting.
266+
Quotation marks are inserted in appropriate places in a document with the ''open-quote'' and ''close-quote'' values of the 'content' property. Each occurrence of ''open-quote'' or ''close-quote'' is replaced by one of the strings from the value of 'quotes', based on the depth of nesting.
269267

270-
''open-quote'' refers to the first of a pair of quotes, ''close-quote'' refers to the second. Which pair of quotes is used depends on the nesting level of quotes: the number of occurrences of ''open-quote'' in all generated text before the current occurrence, minus the number of occurrences of ''close-quote''. If the depth is 0, the first pair is used, if the depth is 1, the second pair is used, etc. If the depth is greater than the number of pairs, the last pair is repeated.
268+
''open-quote'' refers to the first of a pair of quotes, ''close-quote'' refers to the second. Which pair of quotes is used depends on the nesting level of quotes: the number of occurrences of ''open-quote'' in all generated text before the current occurrence, minus the number of occurrences of ''close-quote''. If the depth is 0, the first pair is used, if the depth is 1, the second pair is used, etc. If the depth is greater than the number of pairs, the last pair is repeated.
271269

272-
Note that this quoting depth is independent of the nesting of the source document or the formatting structure.
270+
Note that this quoting depth is independent of the nesting of the source document or the formatting structure.
273271

274-
Some typographic styles require open quotation marks to be repeated before every paragraph of a quote spanning several paragraphs, but only the last paragraph ends with a closing quotation mark. In CSS, this can be achieved by inserting "phantom" closing quotes. The keyword ''no-close-quote'' decrements the quoting level, but does not insert a quotation mark.
272+
Some typographic styles require open quotation marks to be repeated before every paragraph of a quote spanning several paragraphs, but only the last paragraph ends with a closing quotation mark. In CSS, this can be achieved by inserting "phantom" closing quotes. The keyword ''no-close-quote'' decrements the quoting level, but does not insert a quotation mark.
275273

276274

277-
<div class="example">
278-
The following style sheet puts opening quotation marks on every paragraph in a <code>blockquote</code>, and inserts a single closing quote at the end:
275+
<div class="example">
276+
The following style sheet puts opening quotation marks on every paragraph in a <code>blockquote</code>, and inserts a single closing quote at the end:
279277

280-
<pre>
281-
blockquote p:before { content: open-quote }
282-
blockquote p:after { content: no-close-quote }
283-
blockquote p:last-child::after { content: close-quote }
284-
</pre>
278+
<pre>
279+
blockquote p:before { content: open-quote }
280+
blockquote p:after { content: no-close-quote }
281+
blockquote p:last-child::after { content: close-quote }
282+
</pre>
285283

286-
</div>
284+
</div>
287285

288-
For symmetry, there is also a ''no-open-quote'' keyword, which inserts nothing, but increments the quotation depth by one.
286+
For symmetry, there is also a ''no-open-quote'' keyword, which inserts nothing, but increments the quotation depth by one.
289287

290-
<div class="note">If a quotation is in a different language than the surrounding text, it is customary to quote the text with the quote marks of the language of the surrounding text, not the language of the quotation itself.
291-
</div>
288+
<div class="note">If a quotation is in a different language than the surrounding text, it is customary to quote the text with the quote marks of the language of the surrounding text, not the language of the quotation itself.
289+
</div>
292290

293-
<div class="example">
294-
For example, French inside English:
291+
<div class="example">
292+
For example, French inside English:
295293

296-
<blockquote>
297-
The device of the order of the garter is “Honi soit qui mal y pense.”
298-
</blockquote>
294+
<blockquote>
295+
The device of the order of the garter is “Honi soit qui mal y pense.”
296+
</blockquote>
299297

300-
English inside French:
298+
English inside French:
301299

302-
<blockquote>
303-
Il disait: «&#8197;Il faut mettre l’action en ‹&#8197;fast
304-
forward&#8197;›.&#8197;»
305-
</blockquote>
300+
<blockquote>
301+
Il disait: «&#8197;Il faut mettre l’action en ‹&#8197;fast
302+
forward&#8197;›.&#8197;»
303+
</blockquote>
306304

307-
A style sheet like the following will set the 'quotes' property so that ''open-quote'' and ''close-quote'' will work correctly on all elements. These rules are for documents that contain only English, French, or both. One rule is needed for every additional language. Note the use of the child combinator (">") to set quotes on elements based on the language of the surrounding text:
305+
A style sheet like the following will set the 'quotes' property so that ''open-quote'' and ''close-quote'' will work correctly on all elements. These rules are for documents that contain only English, French, or both. One rule is needed for every additional language. Note the use of the child combinator (">") to set quotes on elements based on the language of the surrounding text:
308306

309-
<pre>
310-
:lang(fr) > * { quotes: "\00AB\2005" "\2005\00BB" "\2039\2005" "\2005\203A" }
311-
:lang(en) > * { quotes: "\201C" "\201D" "\2018" "\2019" }
312-
</pre>
307+
<pre>
308+
:lang(fr) > * { quotes: "\00AB\2005" "\2005\00BB" "\2039\2005" "\2005\203A" }
309+
:lang(en) > * { quotes: "\201C" "\201D" "\2018" "\2019" }
310+
</pre>
313311

314312

315313

316-
The quotation marks are shown here in a form that most people will be able to type. If you can type them directly, they will look like this:
314+
The quotation marks are shown here in a form that most people will be able to type. If you can type them directly, they will look like this:
317315

318-
<pre>
319-
:lang(fr) > * { quotes: "« " " »" "‹ " " ›" }
320-
:lang(en) > * { quotes: "&#8220;" "&#8221;" "&#8216;" "&#8217;" }
316+
<pre>
317+
:lang(fr) > * { quotes: "« " " »" "‹ " " ›" }
318+
:lang(en) > * { quotes: "&#8220;" "&#8221;" "&#8216;" "&#8217;" }
321319

322-
</pre>
323-
</div>
320+
</pre>
321+
</div>
324322

323+
<h3 id=content-datetime>
324+
datetime
325+
</h3>
325326

327+
<dl dfn-for="content, <content-list>" dfn-type=value>
328+
<dt><dfn><<datetime>></dfn>
329+
<dd>Dates and times can be specified with two functions, 'date()' and 'time()'. See the section on dates and times for more information.
330+
</dl>
326331

332+
<h3>
333+
document-url
334+
</h3>
327335

336+
<dl dfn-for="content, <content-list>" dfn-type=value>
337+
<dt><dfn>document-url</dfn>
338+
<dd>The URI of the current document. For local files, this may simply be the local file name.
339+
</dl>
328340

329341

330342

343+
344+
<h3>
345+
leader()
346+
</h3>
347+
348+
<dl dfn-for="content, <content-list>" dfn-type=value>
349+
<dt><dfn>leader()</dfn>
350+
<dd>Inserts a leader. See the section on <a href="#leaders">leaders</a> for more information.
351+
</dl>
352+
331353
<h3 id="cross-references">
332354
Cross-references
333355
</h3>
@@ -754,26 +776,6 @@ BBBBBB
754776
</figure>
755777

756778

757-
<h3>
758-
datetime
759-
</h3>
760-
761-
<dl>
762-
763-
<dt><dfn><<datetime>></dfn>
764-
<dd>Dates and times can be specified with two functions, 'date()' and 'time()'. See the section on dates and times for more information.
765-
</dl>
766-
<h3>
767-
document-url
768-
</h3>
769-
770-
<dl>
771-
772-
<dt><dfn>document-url</dfn>
773-
<dd>The URI of the current document. For local files, this may simply be the local file name.
774-
<dt><dfn>leader()</dfn>
775-
<dd>Inserts a leader. See the section on <a href="#leaders">leaders</a> for more information.
776-
</dl>
777779

778780

779781
<h3 id="counters">

0 commit comments

Comments
 (0)