Skip to content

Commit 0702f3f

Browse files
[LayoutNG] Give flex items their stretched size earlier.
Force the cross size on stretchy items when they are laid out for flex base sizing or cross size determination. Bug: 845235 Change-Id: I49c6b9a9ef1d2e86aa02c47841075ed2726d5619 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762816 Commit-Queue: David Grogan <[email protected]> Reviewed-by: Christian Biesinger <[email protected]> Cr-Commit-Position: refs/heads/master@{#689303}
1 parent 738a91a commit 0702f3f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<title>flex base size and stretched items</title>
3+
<link rel="author" title="David Grogan" href="mailto:[email protected]">
4+
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes" title="bullet #1">
5+
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
6+
<meta name="flags" content="" />
7+
<meta name="assert" content="Item's stretched size is used for laying out descendants when determining flex base size." />
8+
<style>
9+
x-flexbox {
10+
display: flex;
11+
height: 100px;
12+
}
13+
14+
x-item {
15+
background: green;
16+
writing-mode: vertical-lr;
17+
}
18+
19+
x-item > div {
20+
padding-right: 70%;
21+
width: 30px;
22+
}
23+
</style>
24+
25+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
26+
27+
<x-flexbox>
28+
<x-item>
29+
<div></div>
30+
</x-item>
31+
</x-flexbox>

0 commit comments

Comments
 (0)