Skip to content

Commit d971d78

Browse files
committed
[css-pseudo-4] Create subsection for ::first-letter pattern.
1 parent 0744902 commit d971d78

1 file changed

Lines changed: 23 additions & 20 deletions

File tree

css-pseudo-4/Overview.bs

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ Inheritance and the ''::first-line'' Pseudo-element</h4>
287287
<h3 id="first-letter-pseudo">
288288
First-Letter Text: ''::first-letter'' pseudo-element and its ''::prefix'' and ''::postfix'' children</h3>
289289

290+
<div class="figure">
291+
<img alt="A drop-cap initial letter, including the opening quotation mark before it." src="images/first-letter2.gif">
292+
</div>
293+
290294
The <dfn>::first-letter</dfn> [=pseudo-element=] represents
291295
the first Letter, Number, or Symbol
292296
(Unicode category <code>L*</code>, <code>N*</code>, or <code>S*</code>) [=typographic character unit=]
@@ -303,9 +307,27 @@ First-Letter Text: ''::first-letter'' pseudo-element and its ''::prefix'' and ''
303307
on every paragraph following a level-2 header,
304308
using the 'initial-letter' property defined in [[CSS-INLINE-3]]:
305309

306-
<pre class="lang-css">h2 + p::first-letter { initial-letter: 2; }</pre>
310+
<pre class="lang-css">h2 + p::first-letter { initial-letter: 3; }</pre>
307311
</div>
308312

313+
Note: The [=first letter=] may in fact be a digit,
314+
e.g., the “6” in “67 million dollars is a lot of money.”
315+
316+
To allow independent styling of the [=first letter=] itself
317+
and its adjacent punctuation,
318+
associated preceding punctuation
319+
is represented by the <dfn for="::first-letter">::prefix</dfn>
320+
[=sub-pseudo-element=] of the ''::first-letter'' [=pseudo-element=]
321+
(''::first-letter::prefix'');
322+
and associated following punctuation
323+
is represented by the <dfn for="::first-letter">::postfix</dfn>
324+
[=sub-pseudo-element=] of the ''::first-letter'' [=pseudo-element=]
325+
(''::first-letter::postfix'').
326+
See [[#first-letter-pattern]], below.
327+
328+
<h4 id="first-letter-pattern">
329+
First Letters and Associated Punctuation</h4>
330+
309331
As explained in [[CSS-TEXT-3#characters]],
310332
a <a>typographic character unit</a> can include more than one Unicode codepoint.
311333
For example, combining characters must be kept with their base character.
@@ -318,9 +340,6 @@ First-Letter Text: ''::first-letter'' pseudo-element and its ''::prefix'' and ''
318340
to reflect the first-letter traditions of
319341
the ''::first-letter'' pseudo-element’s <em>[=containing block=]</em>’s [=content language=].
320342

321-
Note: Note that the [=first letter=] may in fact
322-
be a digit, e.g., the “6” in “67 million dollars is a lot of money.”
323-
324343
Preceding and following punctuation
325344
must also be included as part of the [=first-letter text=]
326345
in the ''::first-letter'' pseudo-element
@@ -344,11 +363,6 @@ First-Letter Text: ''::first-letter'' pseudo-element and its ''::prefix'' and ''
344363
any <a spec=css-text-3>word-separator characters</a>
345364
</ul>
346365

347-
348-
<div class="figure">
349-
<img alt="Quotes that precede the first letter should be included." src="images/first-letter2.gif">
350-
</div>
351-
352366
<div class="note">
353367
Informally represented, the [=first-letter text=]’s pattern here
354368
can be roughly
@@ -385,17 +399,6 @@ First-Letter Text: ''::first-letter'' pseudo-element and its ''::prefix'' and ''
385399
</pre>
386400
</div>
387401

388-
To allow independent styling of the [=first letter=] itself
389-
and its adjacent punctuation,
390-
such preceding punctuation
391-
is represented by the <dfn for="::first-letter">::prefix</dfn>
392-
sub-[=pseudo-element=] of the ''::first-letter'' [=pseudo-element=]
393-
(''::first-letter::prefix'');
394-
and such following punctuation
395-
is represented by the <dfn for="::first-letter">::postfix</dfn>
396-
sub-[=pseudo-element=] of the ''::first-letter'' [=pseudo-element=]
397-
(''::first-letter::postfix'').
398-
399402
See [[css-text-3#characters]] and [[css-text-3#character-properties]]
400403
for more information on [=typographic character units=]
401404
and their Unicode properties.

0 commit comments

Comments
 (0)