blob: 7f8b89dde1db88e1073f32faf98781f8770c0b11 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
<!DOCTYPE html>
<html>
<link href="resources/grid.css" rel="stylesheet">
<link href="resources/grid-alignment.css" rel="stylesheet">
<style>
.grid {
grid-template-columns: 5px;
grid-template-rows: 5px;
}
.container {
width: 200px;
height: 100px;
}
.ahem {
font: 25px/1 Ahem;
}
.minSmaller {
min-width: 10px;
min-height: 10px;
}
.minBigger {
min-width: 150px;
min-height: 75px;
}
.maxSmaller {
max-width: 10px;
max-height: 10px;
}
.maxBigger {
max-width: 150px;
max-height: 75px;
}
.minHeightSmaller { min-height: 12px; }
.minWidthSmaller { min-width: 12px; }
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid')">
<p>This test checks min-width|height auto behavior for grids</p>
<div class="container">
<div class="grid">
<div class="ahem" data-expected-width="100" data-expected-height="25">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid">
<div class="ahem minSmaller" data-expected-width="10" data-expected-height="10">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid">
<div class="ahem minBigger" data-expected-width="150" data-expected-height="75">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid">
<div class="ahem maxSmaller" data-expected-width="10" data-expected-height="10">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid">
<div class="ahem maxBigger" data-expected-width="100" data-expected-height="25">XXXX</div>
</div>
</div>
<!-- Verify that the same cases without 'stretch' work as expected as well. -->
<div class="container">
<div class="grid itemsStart">
<div class="ahem" data-expected-width="100" data-expected-height="25">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid itemsStart">
<div class="ahem minSmaller" data-expected-width="100" data-expected-height="25">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid itemsStart">
<div class="ahem minBigger" data-expected-width="150" data-expected-height="75">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid itemsStart">
<div class="ahem maxSmaller" data-expected-width="10" data-expected-height="10">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid itemsStart">
<div class="ahem maxBigger" data-expected-width="100" data-expected-height="25">XXXX</div>
</div>
</div>
<!-- Verify we are applying correctly the min-content size. -->
<div class="container">
<div class="grid">
<div class="ahem" data-expected-width="75" data-expected-height="50">XXX X</div>
</div>
</div>
<div class="container">
<div class="grid itemsStart">
<div class="ahem" data-expected-width="75" data-expected-height="50">XXX X</div>
</div>
</div>
<!-- Check that min-width min-height behavior is preserved when using vertical writing modes -->
<div class="container">
<div class="grid verticalLR">
<div class="ahem" data-expected-width="25" data-expected-height="100">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid verticalLR">
<div class="ahem minHeightSmaller" data-expected-width="25" data-expected-height="12">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid verticalLR">
<div class="ahem minWidthSmaller" data-expected-width="12" data-expected-height="100">XXXX</div>
</div>
</div>
</body>
</html>
|