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
First-Line Text: the ''::first-line'' pseudo-element</h3>
57
58
58
59
The <dfn>::first-line</dfn>[=pseudo-element=] represents
59
60
the contents of the [=first formatted line=]
@@ -171,7 +172,7 @@ Finding the First Formatted Line</h4>
171
172
</div>
172
173
173
174
<h4 id="first-line-styling">
174
-
Styling the First Line Pseudo-element</h4>
175
+
Styling the ''::first-line'' Pseudo-element</h4>
175
176
176
177
The ''::first-line'' pseudo-element’s generated box
177
178
behaves similar to that of an inline-level element, but with certain restrictions.
@@ -274,9 +275,9 @@ Inheritance and the ''::first-line'' Pseudo-element</h4>
274
275
275
276
276
277
<h3 id="first-letter-pseudo">
277
-
The ::first-letter pseudo-element</h3>
278
+
First-Letter Text: ''::first-letter'' pseudo-element and its ''::prefix'' and ''::postfix'' children</h3>
278
279
279
-
The <dfn>::first-letter</dfn> pseudo-element represents
280
+
The <dfn>::first-letter</dfn>[=pseudo-element=] represents
280
281
the first <a>typographic letter unit</a>[[!CSS-TEXT-3]]
281
282
on the <a>first formatted line</a> of its <a>originating element</a>,
282
283
its <dfn>first-letter text</dfn>.
@@ -317,8 +318,20 @@ The ::first-letter pseudo-element</h3>
317
318
<img alt="Quotes that precede the first letter should be included." src="images/first-letter2.gif">
318
319
</div>
319
320
321
+
To allow independent styling of the first letter itself
322
+
and its adjacent punctuation,
323
+
any punctuation included in ''::first-letter''
324
+
that comes before the first <a>typographic letter unit</a>
325
+
is represented by the <dfn for="::first-letter">::prefix</dfn>
326
+
sub-[=pseudo-element=] of the ''::first-letter''[=pseudo-element=]
327
+
(''::first-letter::prefix'');
328
+
and any such punctuation that comes after the first <a>typographic letter unit</a>
329
+
is represented by the <dfn for="::first-letter">::postfix</dfn>
330
+
sub-[=pseudo-element=] of the ''::first-letter''[=pseudo-element=]
331
+
(''::first-letter::postfix'').
332
+
320
333
<h4 id="first-letter-application">
321
-
Finding the FirstLetter Text</h4>
334
+
Finding the First-Letter Text</h4>
322
335
323
336
As with ''::first-line'',
324
337
the ''::first-letter'' pseudo-element
@@ -364,7 +377,7 @@ Finding the First Letter Text</h4>
364
377
as its [=first formatted line=] contains no content besides the inline block.
365
378
366
379
<h4 id="first-letter-tree">
367
-
Inheritance and Box Tree Structure of the ''::first-letter'' Pseudo-element</h4>
380
+
Inheritance and Box Tree Structure of the First-Letter Pseudo-elements</h4>
368
381
369
382
The ''::first-letter'' pseudo-element is wrapped
370
383
immediately around the [=first-letter text=] it represents,
@@ -387,20 +400,47 @@ Inheritance and Box Tree Structure of the ''::first-letter'' Pseudo-element</h4>
387
400
to represent the elements’ ''::first-letter'' pseudo-elements,
388
401
it would be something like:
389
402
390
-
<pre class="lang-markup">
403
+
<pre>
391
404
<div>
392
405
<p><span><strong><div::first-letter><p::first-letter></strong>T<strong></…></…></strong>he first few words</span>
393
406
and the rest of the paragraph.
394
407
</div>
395
408
</pre>
396
409
</div>
397
410
411
+
If any ''::first-letter::prefix'' or ''::first-letter::postfix''[=pseudo-elements=] are required,
412
+
they are nested within the innermost ''::first-letter'',
413
+
and otherwise interpreted similar to ''::first-letter'' itself.
414
+
415
+
<div class="example">
416
+
Consider the following markup:
417
+
418
+
<pre class="lang-markup">
419
+
<div>
420
+
<p><span>“The first few words</span>
421
+
and the rest of the quotation.
422
+
</div>
423
+
</pre>
424
+
425
+
If we assume a [=fictional tag sequence=]
426
+
to represent the elements’ ''::first-letter'' pseudo-elements,
427
+
it would be something like:
428
+
429
+
<pre>
430
+
<div>
431
+
<p><span><div::first-letter><p::first-letter><strong><div::first-letter::prefix><p::first-letter::prefix></strong>“<strong></…></…></strong>T</…></…>he first few words</span>
432
+
and the rest of the paragraph.
433
+
</div>
434
+
</pre>
435
+
</div>
436
+
398
437
If the characters that would form the [=first-letter text=]
399
438
are not all in the same element
400
439
(as the <code>‘T</code> in <code class="lang-css"><p>‘<em>T...</code>),
401
-
the user agent may create a ''::first-letter'' pseudo-element
440
+
the user agent may create the ''::first-letter'' pseudo-element
441
+
(and its ''::prefix'' or ''::postfix'' sub-elements, if any)
402
442
from one of the elements, or all elements,
403
-
or simply not create a pseudo-element.
443
+
or simply not create the pseudo-element(s).
404
444
Additionally, if the [=first-letter text=]
405
445
is not at the start of the line
406
446
(for example due to bidirectional reordering,
@@ -413,10 +453,14 @@ Inheritance and Box Tree Structure of the ''::first-letter'' Pseudo-element</h4>
413
453
the same as any [=inline box=] on the same line.
414
454
415
455
<h4 id="first-letter-styling">
416
-
Styling the ''::first-letter'' Pseudo-element</h4>
456
+
Styling the First-Letter Pseudo-elements</h4>
417
457
418
-
In CSS a ::first-letter pseudo-element is similar to an [=inline box=].
419
-
The following properties that apply to ''::first-letter'' pseudo-elements:
458
+
In CSS a ''::first-letter''[=pseudo-element=]
459
+
(and its ''::prefix'' and ''::postfix'' sub-elements)
460
+
is similar to an [=inline box=].
461
+
The following properties that apply to
462
+
''::first-letter'', ''::first-letter::prefix'', and ''::first-letter::postfix''
463
+
pseudo-elements:
420
464
421
465
<ul>
422
466
<li>all font properties (see [[CSS-FONTS-3]])
@@ -922,6 +966,8 @@ List Markers: the ''::marker'' pseudo-element</h3>
922
966
and the computed value of 'display' on ''::marker''
923
967
always loses any ''display/list-item'' aspect.
924
968
969
+
ISSUE: Should ''::marker'' also have ''::prefix'' and ''::postfix'' sub-elements?
970
+
925
971
<h3 id="placeholder-pseudo">
926
972
Placeholder Input: the ''::placeholder'' pseudo-element</h3>
0 commit comments