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
Copy file name to clipboardExpand all lines: css-inline/Overview.bs
+43-43Lines changed: 43 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -349,8 +349,9 @@ This property specifies styling for dropped, raised, and sunken initial letters.
349
349
<dd>This optional second argument argument defines the number of lines the initial letter should sink. Values must be greater than zero. If omitted, it duplicates the first argument, floored to the nearest positive whole number.
350
350
</dl>
351
351
352
-
An <dfn>initial letter</dfn> is a box to which 'initial-letter' applies
353
-
and is not ''initial-letter/normal'': this triggers the special layout considerations described below.
352
+
An <dfn lt="initial letter | initial letter box">initial letter</dfn> is
353
+
a box to which 'initial-letter' applies and is not ''initial-letter/normal'':
354
+
this triggers the special layout considerations described below.
354
355
355
356
<div class="example">
356
357
Here are some examples of 'initial-letter' usage:
@@ -380,26 +381,43 @@ and is not ''initial-letter/normal'': this triggers the special layout considera
380
381
<pre>p::first-letter { initial-letter: 2; }</pre>
381
382
</div>
382
383
384
+
Issue: Define interaction with Ruby. Easiest is to make it not apply to/within ruby.
383
385
386
+
The 'initial-letter' property does not apply to boxes that are not positioned at the start of the line due to bidi reordering.
384
387
385
-
<!--
386
-
<h4 id="processing-model">Processing Model</h4>
387
-
388
-
<ol>
389
-
<li>Find font size based on alignment points and font metrics. No layout information is required.</li>
390
-
391
-
<li>Size content box to fit glyph with no overflow. The content box of a non-atomic inline initial letter is the smallest rectangle required to include the entirety of its glyphs and the margin boxes of any atomic inlines it contains.</li>
388
+
<h4 id="processing-model">Layout Model</h4>
392
389
393
-
<li>The initial letter's margin box is placed at the edge of the line. If it has no padding or borders, it is negatively offset by the distance from the start edge of its content box to the point in the content that would have been placed at the start edge of the containing block if it had ''initial-letter: none''.</li>
390
+
An <a>initial letter</a>is laid out following the steps outlined below:
394
391
395
-
<li>Exclude content within margin box.</li>
392
+
<ol>
393
+
<li>Find font size based on 'initial-letter-align' alignment points and font metrics.
394
+
Note that no layout information is required in this step.
395
+
The font size used for sizing the <a>initial letter</a> contents <em>does not</em> affect its computed 'font-size' property
396
+
(and therefore has no effect on the computation of ''em'' length values, etc.).
397
+
398
+
<li>Size the <a>initial letter</a>’s content box.
399
+
The content box of a non-atomic inline initial letter
400
+
is the smallest rectangle required to include the entirety of its glyphs
401
+
as well as the margin boxes of any atomic inlines it contains.
402
+
403
+
<li>The initial letter's margin box is placed at the edge of the line.
404
+
If it has no padding or borders, it is negatively offset by the distance
405
+
from the start edge of its content box to the point in the content that
406
+
would have been placed at the start edge of the containing block if it had ''initial-letter: none''.
407
+
408
+
<li>Exclude content within the inline letter's margin box
409
+
according to 'initial-letter-wrap'.
396
410
</ol>
397
-
-->
398
411
412
+
<h4 id="initial-letter-box">
413
+
Content-box Size, Margins, Borders, and Padding</h4>
399
414
400
-
Issue: Define interaction with Ruby. Easiest is to make it not apply to/within ruby.
415
+
Initial letters can be styled with margins, padding, and borders just like any other box.
416
+
Unless 'initial-letter-align' is ''initial-letter-align/pborder-box'',
417
+
its vertical alignment and sizing are not affected;
418
+
however the effective exclusion area is (and corresponds to the margin area).
401
419
402
-
The 'initial-letter' property does not apply to boxes that are not positioned at the start of the line due to bidi reordering.
420
+
When padding and borders are zero, the initial letter may be kerned; see below.
403
421
404
422
<h3 id="aligning-initial-letter">
405
423
Alignment of Initial Letters: the 'initial-letter-align' property</h3>
@@ -461,35 +479,6 @@ If 'initial-letter' is applied to an image or other atomic element that does not
461
479
462
480
Note: For 'vertical-align', the alignment points of an atomic inline are synthesized from the margin edges. [[CSS3-WRITING-MODES]]
463
481
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
<h3 id="initial-letter-box">
473
-
Margins, Borders, and Padding</h3>
474
-
475
-
Initial letters can be styled with margins, padding, and borders just like any other box. Their vertical alignment and sizing is not affected; however the effective exclusion area is (and corresponds to the margin area).
476
-
477
-
When padding and borders are zero, the initial letter may be kerned; see below.
478
-
479
-
<h3 id="initial-letter-indentation">
480
-
Indentation and Multi-line Effects</h3>
481
-
482
-
'text-indent' and 'hanging-punctuation' apply to the first line of text as normal in the presence of initial letters. Lines affected by the exclusion are shortened, as in the presence of floats, and are affected the same way.
483
-
484
-
If an initial letter is too long to fit on one line, it wraps (according to the usual text-wrapping rules), each line filled and formatted exactly as if it were the first line and the initial letter too long to fit any subsequent normal text. Any normal text after the initial letter starts on its last line, affected exactly as if that line were the first line.
485
-
486
-
487
-
<figure>
488
-
<img alt="multi-line drop cap" src="images/Multi-line-initial.png" width="300">
489
-
<p class="caption">Drop cap extends to two lines.</p>
490
-
</figure>
491
-
492
-
493
482
<!--
494
483
]]]]]]]]]]]]
495
484
]]]]]=======
@@ -720,8 +709,19 @@ Only the first line is moved up against the ink of the initial letter.
720
709
</div>
721
710
722
711
712
+
<h3 id="initial-letter-indentation">
713
+
Indentation and Multi-line Effects</h3>
714
+
715
+
'text-indent' and 'hanging-punctuation' apply to the first line of text as normal in the presence of initial letters. Lines affected by the exclusion are shortened, as in the presence of floats, and are affected the same way.
716
+
717
+
If an initial letter is too long to fit on one line, it wraps (according to the usual text-wrapping rules), each line filled and formatted exactly as if it were the first line and the initial letter too long to fit any subsequent normal text. Any normal text after the initial letter starts on its last line, affected exactly as if that line were the first line.
723
718
724
719
720
+
<figure>
721
+
<img alt="multi-line drop cap" src="images/Multi-line-initial.png" width="300">
722
+
<p class="caption">Drop cap extends to two lines.</p>
0 commit comments