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
<dd>The user agent selects the value which corresponds to the language of the text. Western languages would default to ''alphabetic'', CJK languages to ''ideographic'', and some Indic languages to ''hanging''. </dd>
442
-
443
-
<dt>alphabetic</dt>
444
-
<dd>As described above, the cap height of the initial letter aligns with the cap height of the first line of text. The baseline of the initial letter aligns with the baseline of the Nth text baseline.</dd>
445
-
446
-
<dt>ideographic</dt>
447
-
<dd>The initial letter is centered in the N-line area.
443
+
Values have the following meanings:
448
444
449
-
<dt>margin-box</dt>
450
-
<dd>Uses the <a>line-over</a> and <a>line-under</a> margin edges
451
-
as the <a>over</a> and <a>under</a> alignment points, respectively.
452
-
453
-
<dt>content-box</dt>
454
-
<dd>Uses the <a>line-over</a> and <a>line-under</a> content edges
455
-
as the <a>over</a> and <a>under</a> alignment points, respectively.
456
-
(In most cases, these will correspond to
457
-
the <a>over</a> and <a>under</a> edges of the glyph bounding box.)
<dd>Use the alphabetic and cap-height baselines of the surrounding text
448
+
to align the <a>initial letter</a>.
449
+
450
+
<dt><dfn>ideographic</dfn>
451
+
<dd>Use the ideographic character face bottom and top edge baselines of the surrounding text
452
+
to align the <a>initial letter</a>.
453
+
454
+
<dt><dfn>hebrew</dfn>
455
+
<dd>Use the alphabetic and (as yet theoretical) hebrew hanging baseline of the surrounding text
456
+
to align the <a>initial letter</a>.
457
+
458
+
<dt><dfn>border-box</dfn>
459
+
<dd>Uses the <a>initial letter box</a>’s <a>line-over</a> and <a>line-under</a> border edges
460
+
as the <a>over</a> and <a>under</a> alignment points, respectively.
458
461
</dl>
459
462
460
-
<p class="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.</p>
461
-
462
463
<div class="example">
463
464
The vertical writing mode example from <a href="#f2">Figure 2</a> could be coded as:
464
465
@@ -468,19 +469,48 @@ span.initial {
468
469
initial-letter-alignment: ideographic;
469
470
}
470
471
</pre>
472
+
</div>
471
473
474
+
Except when ''border-box'' is specified,
475
+
the alignment points of the <a>initial letter</a>
476
+
are automatically determined from its contents:
477
+
<ol>
478
+
<li>If the <a>initial letter</a> is an atomic inline,
479
+
use its <a>over</a> and <a>under</a> content-box edges.
480
+
<li>Else if the <a>initial letter</a> contains any character from the Han, Hangul, Kana, or Yi <a>Unicode scripts</a>,
481
+
use the ideographic character face bottom and top edge baselines.
482
+
<li>Else if the <a>initial letter</a> contains any character from the Hebrew <a>Unicode scripts</a>,
483
+
use the ideographic character face bottom and top edge baselines.
484
+
<li>Else use the alphabetic and cap-height baselines.
485
+
</ol>
486
+
487
+
Note: The ordering of keywords in this property is fixed in case ''border-box''
488
+
is expanded to ''[ border-box | alphabetic | ideographic | hebrew ]''
489
+
to allow explicitly specifying the <a>initial letter</a>’s alignment points.
490
+
491
+
<h4 id="initial-letter-align-defaults">
492
+
UA Default Stylesheet for 'initial-letter-align'</h4>
493
+
494
+
In order to provide the better behavior by default,
495
+
UAs must include in their default UA style sheet the following rules:
If 'initial-letter' is applied to an image or other atomic element that does not provide the necessary alignment information, the alignment points for the atomic inline must be synthesized from the content edges.
506
+
Issue: We don't have a way to do subtag selection with attr selectors.
507
+
(It's a feature of '':lang()'' in Selectors 4,
508
+
but we don't want to use that because we want to hit the language root,
509
+
not all of the descendant elements.)
510
+
These selectors should also include the relevant script subtags.
476
511
477
-
Note: For 'vertical-align', the alignment points of an atomic inline are synthesized from the margin edges. [[CSS3-WRITING-MODES]]
0 commit comments