Skip to content

Commit 6d630f5

Browse files
bfgeekchromium-wpt-export-bot
authored andcommitted
[flex-balance] Add two integration style tests.
- Tests that flex-wrap:balance has no effect on a display:-webkit-box. - Tests a basic balancing flexbox with flex-grow:1. Bug: 416755656 Change-Id: Ic0b79cfae9fa2040672afd0067a5e40c71c01c6a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7852810 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: David Grogan <dgrogan@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/main@{#1631569}
1 parent 27f34ce commit 6d630f5

3 files changed

Lines changed: 69 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<style>
3+
#flex {
4+
display: flex;
5+
flex-wrap: wrap;
6+
width: 100px;
7+
height: 100px;
8+
gap: 10px;
9+
}
10+
11+
#flex > div {
12+
background: green;
13+
}
14+
</style>
15+
<div id="flex">
16+
<div style="width: 50px;"></div>
17+
<div style="width: 40px;"></div>
18+
<div style="width: 40px;"></div>
19+
<div style="width: 50px;"></div>
20+
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<link rel="help" href="https://drafts.csswg.org/css-flexbox-2/">
3+
<link rel="match" href="balance-flex-grow-ref.html">
4+
<meta name="assert" content="Tests a basic balance flexbox with flex-grow specified.">
5+
<style>
6+
#flex {
7+
display: flex;
8+
flex-wrap: balance;
9+
width: 100px;
10+
height: 100px;
11+
gap: 10px;
12+
}
13+
14+
#flex > div {
15+
background: green;
16+
flex-grow: 1;
17+
}
18+
</style>
19+
<div id="flex">
20+
<div style="width: 30px;"></div>
21+
<div style="width: 20px;"></div>
22+
<div style="width: 20px;"></div>
23+
<div style="width: 30px;"></div>
24+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<link rel="help" href="https://drafts.csswg.org/css-flexbox-2/">
3+
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
4+
<meta name="assert" content="flex-wrap:balance doesn't apply to a -webkit-box">
5+
<style>
6+
#webkit-box {
7+
display: -webkit-box;
8+
flex-wrap: balance;
9+
width: 100px;
10+
}
11+
12+
#webkit-box > div {
13+
width: 50px;
14+
height: 100px;
15+
background: green;
16+
-webkit-box-flex: 1;
17+
flex-grow: 1;
18+
}
19+
</style>
20+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
21+
<div id="webkit-box">
22+
<div></div>
23+
<div></div>
24+
<div></div>
25+
</div>

0 commit comments

Comments
 (0)