Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-inline] should define how the initial-letter relates to line boxes #887

Open
dbaron opened this issue Jan 11, 2017 · 1 comment
Open

Comments

@dbaron
Copy link
Member

dbaron commented Jan 11, 2017

Per today's face-to-face discussion, we should define how initial-letter relates to line boxes.

I think we tended to think that it isn't part of the block's first line box. The question is whether it has its own special line box. And whether this has implications for interactions with text-decoration.

@dbaron dbaron added the css-inline-3 Current Work label Jan 11, 2017
@upsuper
Copy link
Member

upsuper commented Jan 15, 2017

Per the current spec, initial-letter can wrap... which probably indicates it can sometimes has even more than one line box...

@fantasai fantasai added this to F2F Discussion in Initial Letters Oct 16, 2018
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 1, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Detals

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing block’s
block end.

The spec says[3]:

This property specifies the alignment points used to size and position an
initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 1, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Detals

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 1, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Detals

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
aarongable pushed a commit to chromium/chromium that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].


# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067085
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078467}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067085
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078467}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067085
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078467}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Dec 11, 2022
…for drop, raise, sunken initial, a=testonly

Automatic update from web-platform-tests
[initial-letter] Use baseline alignment for drop, raise, sunken initial

This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067085
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078467}

--

wpt-commits: e1400ef4581676b52364c3c7b9587c705c564ab9
wpt-pr: 37277
BruceDai pushed a commit to BruceDai/wpt that referenced this issue Dec 13, 2022
This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067085
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078467}
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Dec 14, 2022
…for drop, raise, sunken initial, a=testonly

Automatic update from web-platform-tests
[initial-letter] Use baseline alignment for drop, raise, sunken initial

This patch changes `ComputeInitialLetterBoxBlockOffset()` to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. `initial-letter: 3 drop`, `initial-letter: 3 raise`,
`initial-letter: 3 2` to match the spec[1][2].

This patch also introduces new test:
 `initial-letter-text-decoration-underline.html`
for verifying baseline alignment and underline for the open issue
887[5].

# Details

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing
block’s block end.

The spec says[3]:

This property specifies the alignment points used to size and position
an initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
`initial-letter-align: alphabetic`[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] w3c/csswg-drafts#887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067085
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078467}

--

wpt-commits: e1400ef4581676b52364c3c7b9587c705c564ab9
wpt-pr: 37277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Initial Letters
CSSWG Discussion
Development

No branches or pull requests

3 participants