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
+32-44Lines changed: 32 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -269,13 +269,6 @@ The alignment constraints for drop initials depend on the writing system. In ide
269
269
<p class="caption">Two-line drop initial in vertical writing mode</p>
270
270
</figure>
271
271
272
-
<figure>
273
-
<img src="images/CJK-Initial.001.png" width="480" alt="Diagram of Japanese initial letter in vertical writing mode"/>
274
-
<p class="caption">Diagram of Japanese initial letter in vertical writing mode</p>
275
-
</figure>
276
-
277
-
Note: In some cases, the exclusion area for the drop initial is larger than its glyph in order to preserve inline-axis alignment. This effect is out-of-scope for this level. However, extra spacing can still be given using margins.
278
-
279
272
In some Indic scripts, the top alignment point
280
273
is the hanging baseline,
281
274
and the bottom alignment point is the text-after-edge.
@@ -585,12 +578,12 @@ However, if the <a>initial letter</a> is a non-atomic inline with zero padding a
585
578
586
579
587
580
<h3 id="initial-letter-wrapping">
588
-
Initial Letter Wrapping</h3>
581
+
Initial Letter Wrapping: the 'initial-letter-wrap' property</h3>
Applies to: <code>::first-letter</code> pseudo-elements and inline-level first child of a block container
595
588
Inherited: yes
596
589
Percentages: N/A
@@ -608,35 +601,34 @@ or follow the contour of its end-edge glyph outline.
608
601
each impacted line is aligned flush to the end margin edge of the <a>initial letter</a>.</dd>
609
602
610
603
<dt><dfn>first</dfn>
611
-
<dd>Behaves as for ''all'' on the first line of the block containing the initial letter and as ''none'' on the rest.</dd>
604
+
<dd>Behaves as ''none'' if
605
+
the first <a>typographic character unit</a> after the <a>initial letter</a>
606
+
belongs to Unicode General Category Zs.
607
+
Otherwise behaves as for ''all'' on the first line of the block containing the initial letter
608
+
and as ''none'' on the rest.
609
+
610
+
<div class="example">
611
+
This example shows why the contour-fitting the first line is necessary,
612
+
and why it is dropped when the <a>initial letter</a> is followed by a space:
613
+
<figure>
614
+
<img src="images/OpticalKerning.png" alt="optical kerning in the presence or absence of a space after the initial letter" width="200"/>
615
+
<p class="caption">
616
+
In the top paragraph, the initial letter "A" has a word space after it:
617
+
the gap between the top of the "A" and the next letter provides the necessary word separation.
618
+
In the next paragraph, the initial letter "A" is part of the first word,
619
+
and leaving a gap between the top of the "A" and the next letter would create a jarring visual break within the word.
620
+
In this case, the first line of text should be kerned into the initial letter's area, as shown in the bottom paragraph.
621
+
</figure>
622
+
</div>
623
+
624
+
Issue: Do we need an unconditional ''first''?
625
+
(I.e. Should we rename this value to ''auto'' and add a ''first'' value that does not check for spaces?)
612
626
613
627
<dt><dfn>all</dfn></dt>
614
628
<dd>For each line of text impacted by the initial letter, the line box adjacent to the intial letter starts at the start-most point that touches the ink of the initial letter, plus the amount of the <a>initial letter</a>’s end-side border+padding+margin.</dd>
615
629
616
630
This value is at-risk.
617
631
618
-
<dt><dfn>auto</dfn>
619
-
<dd>Behaves as ''none'' if
620
-
the <a>initial letter</a>’s end-side padding or margin is nonzero <em>or</em>
621
-
the first <a>typographic character unit</a> after the <a>initial letter</a> belongs to Unicode General Category Zs <em>or</em>
622
-
the last <a>typographic character unit</a> of the <a>initial letter</a>
623
-
<ul>
624
-
<li>belongs to the Symbols <a>Unicode General Category</a> (<code>S</code>)
625
-
<li>has an East Asian Width property of <code>Wide</code> or <code>Fullwidth</code>
626
-
<li>belongs to a script that is commonly used without spaces between words.
627
-
(Such scripts include:
628
-
Cham,
629
-
Han,
630
-
Khmer,
631
-
Lao,
632
-
Thai,
633
-
Yi
634
-
)
635
-
</ul>
636
-
Behaves as ''first'' otherwise.
637
-
638
-
Issue: Do we want to make this script-dependent?
639
-
640
632
<dt><dfn>grid</dfn>
641
633
<dd>This value is the same as ''none'',
642
634
except that the exclusion area of the impacted lines
@@ -651,21 +643,17 @@ as specified by the 'initial-letter' property,
651
643
and 1em represents the typical character advance width for ideographic characters
652
644
(and may be replaced by a more accurate value if known).
653
645
654
-
This value is also at-risk.
655
-
</dl>
656
-
657
-
658
-
Issue: Do we need anything else for scripts where this behavior is undesirable? Or is default "none" sufficient?
659
-
660
-
661
-
Note: If the next character after the initial letter is a whitespace character, auto and first compute to none, in order to avoid the initial letter appearing to be part of the subsequent word.
662
-
663
-
664
646
<figure>
665
-
<img src="images/OpticalKerning.png" alt="optical kerning in the presence or absence of a space after the initial letter" width="200"/>
666
-
<p class="caption">In the top paragraph, the initial letter "A" has a word space after it. In the middle paragraph, the initial letter "A" is part of a word. In this case, the first line of text should be kerned into the initial letter's area as shown in the bottom paragraph.</p>
647
+
<img src="images/CJK-Initial.001.png" width="480" alt="Diagram of Japanese initial letter in vertical writing mode"/>
648
+
<p class="caption">Diagram of Japanese initial letterin vertical writing mode</p>
667
649
</figure>
668
650
651
+
Note: In this example, the exclusion area for the drop initial
652
+
is larger than its glyph in order to preserve inline-axis alignment.
653
+
654
+
This value is also at-risk.
655
+
</dl>
656
+
669
657
Issue: Edit figure to show how auto behaves in varying contexts
<imgalt="Diagram of Japanese initial letter in vertical writing mode" src="images/CJK-Initial.001.png" width="480">
693
-
694
-
<pclass="caption">Diagram of Japanese initial letter in vertical writing mode</p>
695
-
</figure>
696
-
697
-
698
-
<pclass="note" role="note">Note: In some cases, the exclusion area for the drop initial is larger than its glyph in order to preserve inline-axis alignment. This effect is out-of-scope for this level. However, extra spacing can still be given using margins.</p>
699
-
700
-
701
691
<p>In some Indic scripts, the top alignment point
702
692
is the hanging baseline,
703
693
and the bottom alignment point is the text-after-edge.</p>
Initial Letter Wrapping</span><aclass="self-link" href="#initial-letter-wrapping"></a></h3>
1113
+
Initial Letter Wrapping: the <aclass="property" data-link-type="propdesc" href="#propdef-initial-letter-wrap">initial-letter-wrap</a> property</span><aclass="self-link" href="#initial-letter-wrapping"></a></h3>
<tdclass="prod">none <adata-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> first <adata-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> all <adata-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> auto <adata-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> grid
1134
1124
<tr>
1135
1125
<th>Initial:
1136
-
<td>auto
1126
+
<td>none
1137
1127
<tr>
1138
1128
<th>Applies to:
1139
1129
<td><code>::first-letter</code> pseudo-elements and inline-level first child of a block container
<dd>Behaves as for <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-all">all</a> on the first line of the block containing the initial letter and as <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-none">none</a> on the rest.
<dd>Behaves as <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-none">none</a> if
1163
+
the first <adata-link-type="dfn" href="https://drafts.csswg.org/css-text-3/#typographic-character-unit">typographic character unit</a> after the <adata-link-type="dfn" href="#initial-letter">initial letter</a>
1164
+
belongs to Unicode General Category Zs.
1165
+
Otherwise behaves as for <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-all">all</a> on the first line of the block containing the initial letter
1166
+
and as <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-none">none</a> on the rest.
1176
1167
1177
-
<dd>For each line of text impacted by the initial letter, the line box adjacent to the intial letter starts at the start-most point that touches the ink of the initial letter, plus the amount of the <adata-link-type="dfn" href="#initial-letter">initial letter</a>’s end-side border+padding+margin.
This example shows why the contour-fitting the first line is necessary,
1171
+
and why it is dropped when the <adata-link-type="dfn" href="#initial-letter">initial letter</a> is followed by a space:
1172
+
1173
+
<figure>
1174
+
<imgalt="optical kerning in the presence or absence of a space after the initial letter" src="images/OpticalKerning.png" width="200">
1175
+
1176
+
<pclass="caption">
1177
+
In the top paragraph, the initial letter "A" has a word space after it:
1178
+
the gap between the top of the "A" and the next letter provides the necessary word separation.
1179
+
In the next paragraph, the initial letter "A" is part of the first word,
1180
+
and leaving a gap between the top of the "A" and the next letter would create a jarring visual break within the word.
1181
+
In this case, the first line of text should be kerned into the initial letter’s area, as shown in the bottom paragraph.
1182
+
</p>
1183
+
</figure>
1184
+
</div>
1179
1185
1180
-
<p>This value is at-risk.</p>
1181
1186
1187
+
<pclass="issue" id="issue-a826765c"><aclass="self-link" href="#issue-a826765c"></a> Do we need an unconditional <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-first">first</a>?
1188
+
(I.e. Should we rename this value to <aclass="css" data-link-type="maybe" href="#valdef-dominant-baseline-auto">auto</a> and add a <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-first">first</a> value that does not check for spaces?)</p>
<dd>Behaves as <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-none">none</a> if
1186
-
the <adata-link-type="dfn" href="#initial-letter">initial letter</a>’s end-side padding or margin is nonzero <em>or</em>
1187
-
the first <adata-link-type="dfn" href="https://drafts.csswg.org/css-text-3/#typographic-character-unit">typographic character unit</a> after the <adata-link-type="dfn" href="#initial-letter">initial letter</a> belongs to Unicode General Category Zs <em>or</em>
1188
-
the last <adata-link-type="dfn" href="https://drafts.csswg.org/css-text-3/#typographic-character-unit">typographic character unit</a> of the <adata-link-type="dfn" href="#initial-letter">initial letter</a>
<li>belongs to the Symbols <adata-link-type="dfn" href="https://drafts.csswg.org/css-text-3/#unicode-general-category">Unicode General Category</a> (<code>S</code>)
1193
-
1194
-
<li>has an East Asian Width property of <code>Wide</code> or <code>Fullwidth</code>
1195
-
1196
-
<li>belongs to a script that is commonly used without spaces between words.
1197
-
(Such scripts include:
1198
-
Cham,
1199
-
Han,
1200
-
Khmer,
1201
-
Lao,
1202
-
Thai,
1203
-
Yi
1204
-
)
1205
-
</ul>
1206
-
Behaves as <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-first">first</a> otherwise.
1193
+
<dd>For each line of text impacted by the initial letter, the line box adjacent to the intial letter starts at the start-most point that touches the ink of the initial letter, plus the amount of the <adata-link-type="dfn" href="#initial-letter">initial letter</a>’s end-side border+padding+margin.
1207
1194
1208
1195
1209
-
<pclass="issue" id="issue-36a8e5f0"><aclass="self-link" href="#issue-36a8e5f0"></a> Do we want to make this script-dependent?</p>
(and may be replaced by a more accurate value if known).</p>
1227
1214
1228
1215
1229
-
<p>This value is also at-risk.</p>
1230
-
</dl>
1231
-
1232
-
1233
-
1234
-
<pclass="issue" id="issue-d0eaa352"><aclass="self-link" href="#issue-d0eaa352"></a> Do we need anything else for scripts where this behavior is undesirable? Or is default "none" sufficient?</p>
1235
-
1236
-
1237
-
1238
-
<pclass="note" role="note">Note: If the next character after the initial letter is a whitespace character, auto and first compute to none, in order to avoid the initial letter appearing to be part of the subsequent word.</p>
1216
+
<figure>
1217
+
<imgalt="Diagram of Japanese initial letter in vertical writing mode" src="images/CJK-Initial.001.png" width="480">
1218
+
1219
+
<pclass="caption">Diagram of Japanese initial letter in vertical writing mode</p>
1220
+
</figure>
1239
1221
1240
1222
1223
+
<pclass="note" role="note">Note: In this example, the exclusion area for the drop initial
1224
+
is larger than its glyph in order to preserve inline-axis alignment.</p>
1241
1225
1242
-
<figure>
1243
-
<imgalt="optical kerning in the presence or absence of a space after the initial letter" src="images/OpticalKerning.png" width="200">
1244
1226
1245
-
<pclass="caption">In the top paragraph, the initial letter "A" has a word space after it. In the middle paragraph, the initial letter "A" is part of a word. In this case, the first line of text should be kerned into the initial letter’s area as shown in the bottom paragraph.</p>
1246
-
</figure>
1227
+
<p>This value is also at-risk.</p>
1228
+
</dl>
1247
1229
1248
1230
1249
1231
<pclass="issue" id="issue-c4ff3304"><aclass="self-link" href="#issue-c4ff3304"></a> Edit figure to show how auto behaves in varying contexts</p>
<divclass="issue"> Define interaction with Ruby. Easiest is to make it not apply to/within ruby.<ahref="#issue-664624cd"> ↵ </a></div>
1815
1792
<divclass="issue">Input from those knowledgeable about non-Western typographic traditions would be very helpful in describing the appropriate alignments. More values may be required for this property.<ahref="#issue-209367a3"> ↵ </a></div>
1816
1793
<divclass="issue"> Are there other things we need to consider here?<ahref="#issue-bef56215"> ↵ </a></div>
1817
-
<divclass="issue"> Do we want to make this script-dependent?<ahref="#issue-36a8e5f0"> ↵ </a></div>
1818
-
<divclass="issue"> Do we need anything else for scripts where this behavior is undesirable? Or is default "none" sufficient?<ahref="#issue-d0eaa352"> ↵ </a></div>
1794
+
<divclass="issue"> Do we need an unconditional <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-first">first</a>?
1795
+
(I.e. Should we rename this value to <aclass="css" data-link-type="maybe" href="#valdef-dominant-baseline-auto">auto</a> and add a <aclass="css" data-link-type="maybe" href="#valdef-initial-letter-wrap-first">first</a> value that does not check for spaces?)<ahref="#issue-a826765c"> ↵ </a></div>
1819
1796
<divclass="issue"> Edit figure to show how auto behaves in varying contexts<ahref="#issue-c4ff3304"> ↵ </a></div>
1820
1797
<divclass="issue"> Handle glyph ink above cap height of font.<ahref="#issue-f77cbeb9"> ↵ </a></div>
1821
1798
<divclass="issue"> Is this the behavior we want? What if the float is on the same line as the initial letter?<ahref="#issue-2ad0a0cb"> ↵ </a></div>
0 commit comments