Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 7849029

Browse files
[css-flexbox] Test for definite flex basis of fully inflexible item
Safari and blink legacy fail this; EdgeHTML, Firefox, and blink NG pass it, but I think blink NG passes it by accident for now. Change-Id: I38acc8ba98d3897aa77305a36c2ae6f2affec640 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713143 Commit-Queue: David Grogan <[email protected]> Reviewed-by: Christian Biesinger <[email protected]> Cr-Commit-Position: refs/heads/master@{#684111}
1 parent d3d4c6e commit 7849029

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<title>Definite cross sizes</title>
3+
<link rel="author" title="David Grogan" href="mailto:[email protected]">
4+
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#definite-sizes">
5+
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
6+
<meta name="flags" content="" />
7+
<meta name="assert" content="In a column flexbox, the height of a fully inflexible item with fixed flex-basis is definite, and percent children resolve against the flex basis, not the specified height." />
8+
9+
<style>
10+
x-flexbox {
11+
display: flex;
12+
flex-direction: column;
13+
}
14+
15+
x-item {
16+
height: 0px;
17+
flex: 0 0 100px;
18+
}
19+
20+
x-item>div {
21+
width: 100px;
22+
height: 100%;
23+
background: green;
24+
}
25+
26+
#reference-overlapped-red {
27+
position: absolute;
28+
background-color: red;
29+
width: 100px;
30+
height: 100px;
31+
z-index: -1;
32+
}
33+
</style>
34+
35+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
36+
37+
<div id="reference-overlapped-red"></div>
38+
39+
<x-flexbox>
40+
<x-item>
41+
<div></div>
42+
</x-item>
43+
</x-flexbox>

0 commit comments

Comments
 (0)