Skip to content

Commit 36fd3dc

Browse files
committed
[css-inline-3] Define how initial letter is positioned wrt its containing block per <https://lists.w3.org/Archives/Public/www-style/2018Nov/0007.html> #719
1 parent 158ef9d commit 36fd3dc

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

css-inline-3/Overview.bs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,6 +1907,25 @@ Sizing the Initial Letter Box
19071907
excluding any that hang
19081908
(see 'hanging-punctuation')--
19091909
as well as the margin boxes of any atomic inlines it contains.
1910+
However, if its [=block-start=] [=padding=] and [=border=] are both zero,
1911+
then its [=block-start=] [=content edge=] instead coincides
1912+
with its [=over=] alignment point instead,
1913+
and any glyph ink above that point is ignored for the purpose of layout.
1914+
1915+
Note: If an [=inline initial letter=] has ascenders above its [=over=] alignment point,
1916+
and the author has not provided sufficient [=margin=]
1917+
on either the [=initial letter=] itself or its [=containing block=],
1918+
then those ascenders might collide with preceding content.
1919+
1920+
Note: It might be nice to automatically provide the necessary spacing
1921+
by treating such ascenders as a margin that can collapse
1922+
with the margin of the containing block,
1923+
and thus guarantee the requisite spacing without imposing any additional space
1924+
unless it becomes actually necessary.
1925+
Depending on implementation complexity,
1926+
this option may be explored in the future;
1927+
but in the meantime,
1928+
authors need to be careful to provide the requisite spacing explicitly.
19101929

19111930
ISSUE: Should the hanging punctuation be included in the box instead
19121931
(so that the box is drawn around the punctuation when it is made visible through borders/background),
@@ -2000,6 +2019,7 @@ Space Below Initial Letters
20002019
Block-axis Positioning
20012020

20022021
In the block axis, the initial letter is positioned
2022+
with respect to the [=line box=] in which it originates
20032023
as required to satisfy its under alignment point ('initial-letter-align')
20042024
at its specified [=initial letter sink|sink=] ('initial-letter'),
20052025
i.e. it is positioned
@@ -2017,7 +2037,13 @@ Block-axis Positioning
20172037
is not affected by the content of the spanned lines.">
20182038
20192039

2020-
Its position is anchored with respect to the line on which it occurs.
2040+
The [=initial letter=] does not increase the [=logical height=]
2041+
of the [=line box=] in which it participates:
2042+
it can protrude above or below it.
2043+
It must be positioned such that its own [=block-start=] [=margin edge=]
2044+
is below its [=containing block=]’s [=block-start=] [=content edge=],
2045+
and thus can force its originating [=line box=] (and subsequent content)
2046+
to shift further away from that edge.
20212047

20222048

20232049
Inline Positioning and Kerning

0 commit comments

Comments
 (0)