blob: 0b0b5b4d4e5a9e8011d7fdee87cce9caba5fa241 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
<!DOCTYPE html>
<html>
<title>CSS Flexbox: height resizing with flex-direction: column</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-direction-property">
<link rel="help" href="https://crbug.com/527039">
<meta name="assert" content="This test checks that resizing the height of a layout with two nested flexboxes using 'flex-direction: column' correctly recalculates the outer box's height." />
<style>
body,
html {
height: 100%;
}
.OuterFlexbox {
display: flex;
flex-direction: column;
height: 100%;
}
.InnerFlexbox {
display: flex;
flex-direction: column;
max-height: 100%;
outline: 1px blue solid;
}
.InnerFlexbox-body {
flex: 1 1 auto;
overflow-y: hidden;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="update()">
<div class="OuterFlexbox" data-expected-height="250">
<div class="InnerFlexbox" data-expected-height="250">
<div class="InnerFlexbox-body" data-expected-height="250">
<ul>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
<li>Suspendisse eu nunc lectus. Curabitur.</li>
</ul>
</div>
</div>
</div>
<script>
function update() {
document.body.offsetHeight;
document.body.style.height = '50px';
document.body.offsetHeight;
document.body.style.height = '250px';
document.body.offsetHeight;
checkLayout('.OuterFlexbox');
}
</script>
</body>
</html>
|