Skip to content

Commit 7cf79f5

Browse files
kojiishichromium-wpt-export-bot
authored andcommitted
[block-in-inline] Add tests for text-align
The `text-align` property handles the last line differently. This patch adds tests when the `text-align` property is applied to block-in-inline. Bug: 716930 Change-Id: I1c95e4238b320db8b874096a893b39662f8eaeac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3199522 Commit-Queue: Koji Ishii <[email protected]> Commit-Queue: Ian Kilpatrick <[email protected]> Auto-Submit: Koji Ishii <[email protected]> Reviewed-by: Ian Kilpatrick <[email protected]> Cr-Commit-Position: refs/heads/main@{#927337}
1 parent 450f1e8 commit 7cf79f5

File tree

4 files changed

+81
-0
lines changed

4 files changed

+81
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<style>
3+
section {
4+
width: 10ch;
5+
}
6+
.justify {
7+
text-align: justify;
8+
}
9+
</style>
10+
<body>
11+
<section class="justify">
12+
<div>1234 5678 9012</div>
13+
<div>1234 5678 9012</div>
14+
<div>1234 5678 9012</div>
15+
</section>
16+
</body>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<meta name="assert" content="Test if `text-align: justify` handles block-in-inline correctly">
3+
<link rel="match" href="block-in-inline-align-justify-001-ref.html"/>
4+
<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level" />
5+
<link rel='help' href='https://drafts.csswg.org/css-text-3/#text-align-property'>
6+
<link rel="author" title="Koji Ishii" href="mailto:[email protected]" />
7+
<style>
8+
section {
9+
width: 10ch;
10+
}
11+
.justify {
12+
text-align: justify;
13+
}
14+
</style>
15+
<body>
16+
<section class="justify">
17+
<span>
18+
1234 5678 9012
19+
<div>1234 5678 9012</div>
20+
1234 5678 9012
21+
</span>
22+
</section>
23+
</body>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<style>
3+
section {
4+
width: 10ch;
5+
}
6+
.right {
7+
text-align: right;
8+
}
9+
</style>
10+
<body>
11+
<section>
12+
<div>1234567</div>
13+
<div class="right">1234567</div>
14+
<div>1234567</div>
15+
<div class="right">1234567</div>
16+
<div>1234567</div>
17+
<div class="right">1234567</div>
18+
</section>
19+
</body>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<meta name="assert" content="Test if `text-align-last` handles block-in-inline correctly">
3+
<link rel="match" href="block-in-inline-align-last-001-ref.html"/>
4+
<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level" />
5+
<link rel='help' href='https://drafts.csswg.org/css-text-3/#text-align-property'>
6+
<link rel="author" title="Koji Ishii" href="mailto:[email protected]" />
7+
<style>
8+
section {
9+
width: 10ch;
10+
}
11+
.last-right {
12+
text-align-last: right;
13+
}
14+
</style>
15+
<body>
16+
<section class="last-right">
17+
<span>
18+
1234567 1234567
19+
<div>1234567 1234567</div>
20+
1234567 1234567
21+
</span>
22+
</section>
23+
</body>

0 commit comments

Comments
 (0)