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
+111Lines changed: 111 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -457,6 +457,14 @@ If 'initial-letter' is applied to an image or other atomic element that does not
457
457
458
458
Note: For 'vertical-align', the alignment points of an atomic inline are synthesized from the margin edges. [[CSS3-WRITING-MODES]]
459
459
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
460
468
<h3 id="initial-letter-box">
461
469
Margins, Borders, and Padding</h3>
462
470
@@ -564,6 +572,109 @@ In the <a>inline axis</a>, the position of the inline letter is given by alignin
564
572
565
573
However, if the <a>initial letter</a> is a non-atomic inline with zero padding and borders, the UA must apply an additional negative offset on the start side of the amount necessary to optically align the first glyph to the containing block edge as it would be in normal text.
Applies to: <code>::first-letter</code> pseudo-elements and inline-level first child of a block container
584
+
Inherited: no
585
+
Percentages: N/A
586
+
Media: visual
587
+
Computed value: as specified
588
+
</pre>
589
+
590
+
<dl dfn-for=initial-letter-wrap dfn-type=value>
591
+
<dt><dfn>none</dfn>
592
+
<dd>No wrapping is performed.</dd>
593
+
<dt><dfn>auto</dfn></dt>
594
+
<dd>For each line of text impacted by the initial letter, the line box adjacent to the intial letter starts at the left-most point that touches the ink of the initial letter, plus a fixed amount of offset.</dd>
595
+
596
+
Issue: How much offset? Based on the right side-bearing of the initial letter? That could be a problem as it's sometimes negative (see Zapfino).
597
+
598
+
<dt><dfn>first-line</dfn>
599
+
<dd>As auto, but wrapping only performed on the first line of the block containing the initial letter.</dd>
600
+
</dl>
601
+
602
+
Issue: Rewrite for logical directions.
603
+
604
+
Issue: Bikeshed value names.
605
+
606
+
607
+
Issue: Do we need anything else for scripts where this behavior is undesirable? Or is default "none" sufficient?
608
+
609
+
610
+
Note: If the next character after the initial letter is a whitespace character, auto and first-line compute to none, in order to avoid the initial letter appearing to be part of the subsequent word.
<img alt="text wrapping around dropcap A" src="images/A-wraparound.png" width="600">
636
+
637
+
Text follows shape of initial letter. Each line box should just touch the ink of the letter, with some offset (represented by the shaded box).
638
+
639
+
</div>
640
+
641
+
642
+
<div class="example">
643
+
<pre>
644
+
p::first-letter {
645
+
initial-letter: 3;
646
+
initial-letter-wrap: first-line;
647
+
}
648
+
</pre>
649
+
650
+
<img alt="text wrapping around dropcap A but only on first line" src="images/A-wraparound-first.png" width="600">
651
+
652
+
Only first line is moved up against the ink of the initial letter.
653
+
654
+
</div>
655
+
656
+
657
+
<div class="example">
658
+
659
+
<img alt="text wrapping around dropcap V" src="images/V-wraparound.png" width="600">
660
+
661
+
</div>
662
+
663
+
<div class="example">
664
+
665
+
<img alt="text wrapping around dropcap P" src="images/P-wraparound.png" width="600">
666
+
667
+
</div>
668
+
669
+
<div class="example">
670
+
671
+
<img alt="text wrapping around dropcap W" src="images/W-wraparound.png" width="600">
672
+
673
+
</div>
674
+
675
+
Issue: What should happen with initial letters that are concave on the (right) side? Wrapping the middle line in a three-line initial "K" can look very strange.
676
+
677
+
567
678
Additionally, when borders and padding are zero
568
679
and the next <a>typographic character unit</a> after the <a>initial letter</a>
569
680
is not a space (<a>Unicode general category</a><code>Zs</code>),
0 commit comments