forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflex-no-flex.html
More file actions
69 lines (63 loc) · 1.14 KB
/
flex-no-flex.html
File metadata and controls
69 lines (63 loc) · 1.14 KB
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
<!DOCTYPE html>
<html>
<style>
body {
margin: 0;
}
.flexbox {
display: flex;
background-color: #aaa;
position: relative;
}
.flexbox :nth-child(1) {
background-color: blue;
}
.flexbox :nth-child(2) {
background-color: green;
}
.row {
width: 200px;
height: 200px;
}
.row div {
flex: 1 auto;
}
.noflex .row :nth-child(1) {
width: 50px;
flex: none;
}
.column {
flex-direction: column;
width: 200px;
height: 200px;
}
.column div {
flex: 1 auto;
}
.noflex .column :nth-child(1) {
height: 50px;
flex: none;
}
</style>
<script>
function runTest()
{
document.body.className = "noflex";
checkLayout('.flexbox');
}
</script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/check-layout-th.js"></script>
<body onload="runTest()">
<div id=log></div>
<div class="flexbox row">
<div data-expected-width="50"></div>
<div data-expected-width="150"></div>
</div>
<div class="flexbox column">
<div data-expected-height="50"></div>
<div data-expected-height="150"></div>
</div>
</body>
</html>