Skip to content

Commit 082f610

Browse files
kojiishimoz-wptsync-bot
authored andcommitted
Bug 1898670 [wpt PR 46470] - [text-box-trim] Add tests for multi-col, a=testonly
Automatic update from web-platform-tests [text-box-trim] Add tests for multi-col The `text-box-trim` should apply only to the top of the first fragment and the bottom of the last fragment, resolved at w3c/csswg-drafts#5335. This patch adds tests for this, `001` for when the `text-box-trim` is applied to the multicol container, and `002` for when a box with `text-box-trim` is block fragmented by ancestor multicol. Bug: 40254880 Change-Id: Ice29f39cbef0c20284edd809942754176a395d23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564105 Reviewed-by: Kent Tamura Commit-Queue: Kent Tamura Auto-Submit: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1305545} -- wpt-commits: 592dc0a3df19c530baec9079edce72a2625b798e wpt-pr: 46470
1 parent 593b631 commit 082f610

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
>
2+
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
3+
<style>
4+
.spacer {
5+
background: lightgray;
6+
block-size: 100px;
7+
}
8+
.multicol {
9+
column-count: 3;
10+
column-fill: auto;
11+
border: 1px solid;
12+
height: 4lh;
13+
width: 20ch;
14+
font-family: Ahem;
15+
font-size: 40px;
16+
line-height: 2;
17+
}
18+
.up-half {
19+
position: relative;
20+
top: -20px;
21+
}
22+
style>
23+
<div class="multicol">
24+
<span class="up-half">
25+
abc abc abc abc
26+
span>
27+
abc abc abc abc
28+
abc abc
29+
<div class="spacer up-half">div>
30+
div>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
>
2+
<title>Test when a box with `text-box-trim` is multi-columntitle>
3+
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-edge">
4+
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-trim">
5+
<link rel="match" href="text-box-trim-multicol-001-ref.html">
6+
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
7+
<style>
8+
.spacer {
9+
background: lightgray;
10+
block-size: 100px;
11+
}
12+
.multicol {
13+
column-count: 3;
14+
column-fill: auto;
15+
border: 1px solid;
16+
height: 4lh;
17+
width: 20ch;
18+
font-family: Ahem;
19+
font-size: 40px;
20+
line-height: 2;
21+
}
22+
.trim {
23+
text-box-trim: both;
24+
text-box-edge: text;
25+
}
26+
style>
27+
<div class="multicol trim">
28+
abc abc abc abc
29+
abc abc abc abc
30+
abc abc
31+
<div class="spacer">div>
32+
div>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
>
2+
<title>Test when a box with `text-box-trim` is block fragmentedtitle>
3+
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-edge">
4+
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-trim">
5+
<link rel="match" href="text-box-trim-multicol-001-ref.html">
6+
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
7+
<style>
8+
.spacer {
9+
background: lightgray;
10+
block-size: 100px;
11+
}
12+
.multicol {
13+
column-count: 3;
14+
column-fill: auto;
15+
border: 1px solid;
16+
height: 4lh;
17+
width: 20ch;
18+
font-family: Ahem;
19+
font-size: 40px;
20+
line-height: 2;
21+
}
22+
.trim {
23+
text-box-trim: both;
24+
text-box-edge: text;
25+
}
26+
style>
27+
<div class="multicol">
28+
<div class="trim">
29+
abc abc abc abc
30+
abc abc abc abc
31+
abc abc
32+
div>
33+
<div class="spacer">div>
34+
div>

0 commit comments

Comments
 (0)