blob: 184dba34f2b7e410d9627f5dc56ad2a007636149 (
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
75
76
77
78
79
80
|
<!DOCTYPE html>
<html>
<link href="resources/grid.css" rel="stylesheet">
<style>
.container {
position: relative;
width: 500px;
height: 600px;
}
.grid {
grid-template-columns: 40% 60%;
grid-template-rows: 30% 70%;
width: 80%;
height: 50%;
}
.firstRowFirstColumn {
width: 100%;
height: 15px;
}
.firstRowSecondColumn {
width: 15px;
height: 100%;
}
.secondRowFirstColumn {
width: 50%;
height: 50%;
}
.secondRowSecondColumn {
width: -webkit-calc(100%);
height: -webkit-calc(100%);
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid')">
<p>Test that percentage sized grid items inside percentage sized grid tracks inside a percentage size grid get properly sized.</p>
<div class="container">
<div class="grid" data-expected-width="400" data-expected-height="300">
<div class="firstRowFirstColumn" data-expected-width="160" data-expected-height="15"></div>
<div class="firstRowSecondColumn" data-expected-width="15" data-expected-height="90"></div>
<div class="secondRowFirstColumn" data-expected-width="80" data-expected-height="105"></div>
<div class="secondRowSecondColumn" data-expected-width="240" data-expected-height="210"></div>
</div>
</div>
<div class="container">
<div class="grid" style="-webkit-writing-mode: horizontal-bt" data-expected-width="400" data-expected-height="300">
<div class="firstRowFirstColumn" data-expected-width="160" data-expected-height="15"></div>
<div class="firstRowSecondColumn" data-expected-width="15" data-expected-height="90"></div>
<div class="secondRowFirstColumn" data-expected-width="80" data-expected-height="105"></div>
<div class="secondRowSecondColumn" data-expected-width="240" data-expected-height="210"></div>
</div>
</div>
<div class="container">
<div class="grid" style="-webkit-writing-mode: vertical-rl;" data-expected-width="400" data-expected-height="300">
<div class="firstRowFirstColumn" data-expected-width="120" data-expected-height="15"></div>
<div class="firstRowSecondColumn" data-expected-width="15" data-expected-height="180"></div>
<div class="secondRowFirstColumn" data-expected-width="140" data-expected-height="60"></div>
<div class="secondRowSecondColumn" data-expected-width="280" data-expected-height="180"></div>
</div>
</div>
<div class="container">
<div class="grid" style="-webkit-writing-mode: vertical-lr;" data-expected-width="400" data-expected-height="300">
<div class="firstRowFirstColumn" data-expected-width="120" data-expected-height="15"></div>
<div class="firstRowSecondColumn" data-expected-width="15" data-expected-height="180"></div>
<div class="secondRowFirstColumn" data-expected-width="140" data-expected-height="60"></div>
<div class="secondRowSecondColumn" data-expected-width="280" data-expected-height="180"></div>
</div>
</div>
</body>
</html>
|