Skip to content

Commit a78bbef

Browse files
committed
[css-inline] Move positioning into its own section. Define some kerning requirements for the interior.
--HG-- extra : rebase_source : 712a4c50a30c7542043e783bcec5923b504345b8
1 parent 8a20520 commit a78bbef

File tree

2 files changed

+45
-17
lines changed

2 files changed

+45
-17
lines changed

css-inline/Overview.bs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Computed value: as specified
135135

136136
This property specifies styling for dropped, raised, and sunken initial letters. It takes the following values:
137137

138-
<dl for=initial-letter>
138+
<dl dfn-for=initial-letter dfn-type=value>
139139
<dt><dfn>normal</dfn>
140140
<dd>No special initial-letter effect. Text behaves as normal.
141141
<dt><dfn><<number>></dfn>
@@ -244,7 +244,7 @@ Margins, Borders, and Padding</h3>
244244

245245
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).
246246

247-
The inline-axis position of the inline letter is given by aligning its margin edge to the edge of the content box. However, for a non-atomic initial letter with zero padding and borders, there is an additional negative offset so that the first glyph is positioned to the containing block edge as normal. (Note: This requirement is because the start-edge of the glyph's ink area does not always correspond to the start-edge alignment point, which is often chosen for better optical alignment.)
247+
When padding and borders are zero, the initial letter may be kerned; see below.
248248

249249
<h3 id="initial-letter-indentation">
250250
Indentation and Multi-line Effects</h3>
@@ -327,6 +327,20 @@ The margin box of the initial letter is then made an exclusion area for subseque
327327
<p class="caption">Correct: text excluded around glyph bounding box</p>
328328
</figure>
329329

330+
<h3 id="initial-letter-position">Positioning and Kerning Initial Letters</h3>
331+
332+
In the <a>block axis</a>, the <a>initial letter</a> is positioned to satisfy its alignment requirements. (See 'initial-letter-align'.)
333+
334+
In the <a>inline axis</a>, the position of the inline letter is given by aligning its start margin edge to the start edge of the containing block.
335+
336+
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.
337+
338+
Additionally, when borders and padding are zero
339+
and the next <a>typographic character unit</a> after the <a>initial letter</a>
340+
is not a space (<a>Unicode general category</a> <code>Zs</code>),
341+
the UA should optically kern the first line of text into the <a>initial letter</a>’s area
342+
as necessary to maintain perceptual continuity of the text.
343+
330344
<h3 id="initial-letter-paragraphs">Clearing Initial Letters</h3>
331345

332346
<h4 id="raised-sunken-caps">Raised and sunken caps</h4>

0 commit comments

Comments
 (0)