Skip to content

Commit 7d2a7cf

Browse files
committed
Bug 1574674 [wpt PR 18514] - [LayoutNG] Lay out flex items with ShrinkToFit in more cases, a=testonly
Automatic update from web-platform-tests [LayoutNG] Lay out flex items with ShrinkToFit in more cases A row flex box's cross size of {fit,min,max}-content isn't definite, which affects the inline size of orthogonal children. Bug: 845235 Change-Id: Id08a1cf6d23e9e295e87c52d426079bc7e886b74 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758992 Reviewed-by: Christian Biesinger <cbiesingerchromium.org> Commit-Queue: David Grogan <dgroganchromium.org> Cr-Commit-Position: refs/heads/master{#689232} -- wpt-commits: a1cec169e027d234248e36e74c29b1efae1b528c wpt-pr: 18514 UltraBlame original commit: 6fc8a85865f16548350106db4540573e56ac6ce3
1 parent 4b22fef commit 7d2a7cf

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="David Grogan" href="mailto:[email protected]">
3+
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-base-size">
4+
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
5+
<meta name="flags" content="" />
6+
<meta name="assert" content="A flex container's block cross size of min-content is treated as indefinite when setting fit-content on an item for flex base sizing">
7+
8+
<style>
9+
x-flexbox {
10+
display: flex;
11+
height: min-content;
12+
}
13+
14+
.fit-content-item {
15+
background: green;
16+
width: 100px;
17+
writing-mode: vertical-lr;
18+
}
19+
20+
.height-setting-item {
21+
height: 100px;
22+
}
23+
24+
</style>
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
<p>Test passes if there is a filled green square.</p>
38+
39+
<x-flexbox>
40+
<div class="fit-content-item"></div>
41+
<div class="height-setting-item"></div>
42+
</x-flexbox>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="David Grogan" href="mailto:[email protected]">
3+
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-base-size">
4+
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
5+
<meta name="flags" content="" />
6+
<meta name="assert" content="A flex container's block cross size of max-content is treated as indefinite when setting fit-content on an item for flex base sizing">
7+
8+
<style>
9+
x-flexbox {
10+
display: flex;
11+
height: max-content;
12+
}
13+
14+
.fit-content-item {
15+
background: green;
16+
width: 100px;
17+
writing-mode: vertical-lr;
18+
}
19+
20+
.height-setting-item {
21+
height: 100px;
22+
}
23+
24+
</style>
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
<p>Test passes if there is a filled green square.</p>
38+
39+
<x-flexbox>
40+
<div class="fit-content-item"></div>
41+
<div class="height-setting-item"></div>
42+
</x-flexbox>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="David Grogan" href="mailto:[email protected]">
3+
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-base-size">
4+
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
5+
<meta name="flags" content="" />
6+
<meta name="assert" content="A flex container's block cross size of fit-content is treated as indefinite when setting fit-content on an item for flex base sizing">
7+
8+
<style>
9+
x-flexbox {
10+
display: flex;
11+
height: fit-content;
12+
}
13+
14+
.fit-content-item {
15+
background: green;
16+
width: 100px;
17+
writing-mode: vertical-lr;
18+
}
19+
20+
.height-setting-item {
21+
height: 100px;
22+
}
23+
24+
</style>
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
<p>Test passes if there is a filled green square.</p>
38+
39+
<x-flexbox>
40+
<div class="fit-content-item"></div>
41+
<div class="height-setting-item"></div>
42+
</x-flexbox>

0 commit comments

Comments
 (0)