Skip to content

Commit

Permalink
[text-box-trim] Test accumulations
Browse files Browse the repository at this point in the history
This patch adds a test for when the element to trim has
different `text-box-edge` value from the `text-box-edge` value
of the element that has `text-box-trim`. Discussed and
resolved at:
w3c/csswg-drafts#5426

Bug: 40254880
Change-Id: I5685fbaebddb8c7429b3b041c5fe0f88b982fc3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5547563
Auto-Submit: Koji Ishii <kojii@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303166}
  • Loading branch information
kojiishi authored and chromium-wpt-export-bot committed May 19, 2024
1 parent cb53e37 commit 5e6793f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions css/css-inline/text-box-trim/text-box-trim-accumulation-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<title>Test choosing the innermost for `text-box-trim` for requested trim metric</title>
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-edge">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-trim">
<link rel="match" href="text-box-trim-start-001-ref.html?class=text">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
.spacer {
block-size: 100px;
background: lightgray;
}
.target {
font-family: Ahem;
font-size: 100px;
line-height: 2;
text-box-trim: start;
text-box-edge: leading;
}
.inner {
text-box-edge: text;
}
</style>
<div class="spacer"></div>
<div class="target">
<!--
When the element that has `text-box-trim` and `.inner` has different
`text-box-edge` values, use the innermost one.
https://github.com/w3c/csswg-drafts/issues/5426
-->
<div class="inner">A</div>
</div>
<div class="spacer"></div>

0 comments on commit 5e6793f

Please sign in to comment.