-
Notifications
You must be signed in to change notification settings - Fork 54
/
percentage-height-quirk-excludes-flex-grid-001-ref.html
76 lines (71 loc) · 1.51 KB
/
percentage-height-quirk-excludes-flex-grid-001-ref.html
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
75
76
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Reference: Percent height quirk does not traverse flex/grid containers</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<style>
.fixed-height-outer {
height: 80px;
border: 1px solid gray;
margin-bottom: 5px;
}
.row-flex {
display: flex;
flex-direction: row
}
.column-flex {
display: flex;
flex-direction: column
}
.grid {
display: grid;
}
.container {
border: 3px solid black;
}
.pct {
height: 75%;
min-height: 10px;
width: 50px;
display: inline-block;
vertical-align: top;
background: purple;
}
.px {
height: 50px;
width: 50px;
display: inline-block;
vertical-align: top;
background: blue
}
</style>
</head>
<body>
<div class="fixed-height-outer">
<div class="container column-flex">
<div>
<div class="pct"></div>
<div class="px"></div>
</div>
</div>
</div>
<div class="fixed-height-outer">
<div class="container row-flex">
<div>
<div class="pct"></div>
<div class="px"></div>
</div>
</div>
</div>
<div class="fixed-height-outer">
<div class="container grid">
<div>
<div class="pct"></div>
<div class="px"></div>
</div>
</div>
</div>
</body>
</html>