summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-grid/grid-container-baselines-003.html
blob: a1ac4e0c0234bfa806876f7cf4c03d6726b31855 (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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE HTML>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
  <meta charset="utf-8">
  <title>CSS Grid Test: Grid container baselines, nested grids</title>
  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151204">
  <link rel="help" href="https://drafts.csswg.org/css-grid/#grid-baselines">
  <link rel="match" href="grid-container-baselines-003-ref.html">
  <link rel="stylesheet" type="text/css" href="support/ahem.css">
  <style type="text/css">
html,body {
    color:black; background-color:white; font:16px/1 Ahem; padding:0; margin:0;
}

.igrid { display: inline-grid; }
.grid { display: grid; }
.grid, .igrid {
  grid: 13px repeat(3,50px) / 60px 60px;
  border: 1px solid;
  margin: 1px;
}
.grid.sfb , .igrid.sfb {
  grid: repeat(3,50px) 13px / 60px 60px;
}

/* don't clamp grid item automatic minimum size */
.igrid *, .grid * {
  min-width: 0;
  min-height: 0;
}

.a {
  border: 3px solid black;
  background:lime;
}

span:nth-of-type(1) { font-size:32px; }
span:nth-of-type(2) { font-size:36px; }
span:nth-of-type(3) { font-size:48px; }
span:nth-of-type(4) { font-size:24px; }
span.i { font-size:12px; grid-column:2; }

.sfb { align-self:baseline; }
.slb { align-self:last baseline; align-content:self-end; }
.jfb { justify-self:baseline; justify-content:self-end; }
.jlb { justify-self:last baseline; justify-content:self-end; }

.hl { writing-mode: horizontal-tb; direction:ltr; }
.hr { writing-mode: horizontal-tb; direction:rtl; }
.vl { writing-mode: vertical-lr; text-orientation: sideways; }
.vr { writing-mode: vertical-rl; text-orientation: sideways; }
.vlr { writing-mode: vertical-lr; direction:rtl; text-orientation: sideways; }
.vrl { writing-mode: vertical-rl; direction:ltr; text-orientation: sideways; }

</style>
</head>
<body>

<!--  TODO: figure out a way to make a reference for these:

A<div class="igrid">
  <div class="igrid slb" style="grid: 7px 13px 100px / 36px; grid-row: span 4;">
    <n></n>
    <n></n>
    <span class="slb a" style="grid-row:3; margin-bottom:7px; padding-bottom:5px;">A<br>B</span>
  </div>
  <n></n>
  <span class="slb i a" style="grid-row:4">C<br>D</span>
</div>

<div class="igrid" style="grid-template-columns:60px 60px 60px">
  <div class="igrid slb" style="grid: 7px 13px 100px / 36px; grid-row: span 4;">
    <n></n>
    <span class="slb a" style="grid-row:3; margin-bottom:7px; padding-bottom:5px;">A<br>B</span>
  </div>
  <n></n>
  <span class="slb i a" style="grid-row:4">C<br>D</span>
  <span class="slb a" style="grid-row:4; grid-column:3; padding-bottom:20px">E<br>F</span>
</div>

<div class="igrid" style="grid-template-columns:60px 60px 60px">
  <div class="igrid slb" style="grid: 7px 13px 100px / 36px; grid-row: span 4;">
    <n></n>
    <n></n>
    <span class="a" style="grid-row:3; margin-bottom:7px; padding-bottom:5px;">A<br>B</span>
  </div>
  <span class="slb i a" style="grid-row:4">C<br>D</span>
  <span class="slb a " style="grid-row:4; grid-column:3; padding-bottom:20px">E<br>F</span>
</div>

<div class="igrid" style="grid-template-columns:80px 60px 60px">
  <div class="igrid slb" style="grid: 7px 13px 100px / 36px 36px; grid-row: span 4;">
    <span class="a" style="grid-row:3; margin-bottom:7px; padding-bottom:5px;">A<br>B</span>
    <span class="a" style="grid-row:3; ">A<br>B</span>
  </div>
  <n></n>
  <span class="slb i a" style="grid-row:4">C<br>D</span>
  <span class="slb a " style="grid-row:4; grid-column:3; padding-bottom:20px">E<br>F</span>
</div>

<br>
-->

A<div class="igrid sfb">
  <div class="igrid sfb" style="grid: 100px 7px 13px / 36px; grid-row: span 4;">
    <span class="sfb a" style="margin-bottom:7px; padding-bottom:5px;">A<br>B</span>
    <n></n>
    <n></n>
  </div>
  <span class="sfb i a" style="grid-row:1">C<br>D</span>
  <n></n>
</div>

<div class="igrid sfb" style="grid-template-columns:60px 60px 60px">
  <div class="igrid sfb" style="grid: 100px 7px 13px / 36px; grid-row: span 4;">
    <span class="sfb a" style="margin-top:7px; padding-top:5px;">A<br>B</span>
    <n></n>
  </div>
  <span class="sfb i a" style="grid-row:1">C<br>D</span>
  <span class="sfb a" style="grid-row:1; grid-column:3; padding-top:20px">E<br>F</span>
  <n></n>
</div>
<div class="igrid sfb" style="grid-template-columns:60px 60px 60px">
  <div class="igrid sfb" style="grid: 100px 7px 13px / 36px; grid-row: span 4;">
    <span class="a" style="margin-top:7px; padding-top:5px;">A<br>B</span>
    <n></n>
    <n></n>
  </div>
  <span class="sfb i a" style="grid-row:1">C<br>D</span>
  <span class="sfb a " style="grid-row:1; grid-column:3; padding-top:20px">E<br>F</span>
</div>

<div class="igrid sfb" style="grid-template-columns:80px 60px 60px">
  <div class="igrid sfb" style="grid: 100px 7px 13px / 36px 36px; grid-row: span 4;">
    <span class="a" style="margin-top:7px; padding-top:5px;">A<br>B</span>
    <span class="a" style="">A<br>B</span>
  </div>
  <span class="sfb i a" style="grid-row:1">C<br>D</span>
  <span class="sfb a " style="grid-row:1; grid-column:3; padding-top:20px">E<br>F</span>
  <n></n>
</div>

<br>

<!-- TODO: impossible to make a reference due to bug 1166120

A<div class="igrid" style="grid: auto / 100px;">
<span class="jfb a vlr" style="margin:1px 3px 5px 7px">A<br>B</span>
</div>
<div class="igrid" style="grid: auto / 100px;">
<span class="jlb a vlr" style="margin:1px 3px 5px 7px">A<br>B</span>
</div>
<div class="igrid slb" style="grid: auto / 100px;">
<span class="jlb a vlr" style="margin:1px 3px 5px 7px">A<br>B</span>
</div>
<div class="igrid vl" style="grid: 100px / 50px;">
<span class="jlb a" style="margin:1px 3px 5px 7px">A<br>B</span>
</div>
<div class="igrid slb vl" style="grid: 100px / 50px;">
<span class="jfb a" style="margin:1px 3px 5px 7px">A<br>B</span>
</div>
<div class="igrid sfb vl" style="grid: 100px / 50px;">
<span class="jfb a" style="margin:1px 3px 5px 7px">A<br>B</span>
</div>

-->

<!--  TODO: figure out a way to make a reference for these:

A<div class="igrid" style="grid-template-columns:200px">
  <div class="igrid slb vl" style="grid: 1fr / 7px 13px 50px; grid-row: span 4;">
    <n></n>
    <n></n>
    <span class="slb a" style="margin-block-end:27px; padding-block-end:15px;">A<br>B</span>
  </div>
</div><div class="igrid" style="grid-template-columns:200px">
  <div class="igrid slb vl" style="grid: 1fr / 7px 13px 50px; grid-row: span 4;">
    <n></n>
    <n></n>
    <span class="a" style="margin-block-end:27px; padding-block-end:15px;">A<br>B</span>
  </div>
</div><div class="igrid" style="grid-template-columns:200px">
  <div class="igrid slb vl" style="grid: 1fr / 7px 13px 50px; grid-row: span 4;">
    <n></n>
    <n></n>
    <span class="jlb a" style="margin-block-end:27px; padding-block-end:15px;">A<br>B</span>
  </div>
</div>

-->

A<div class="igrid" style="grid-template-columns:200px">
  <div class="igrid sfb vl" style="grid: 1fr / 7px 13px 50px; grid-row: span 4;">
    <span class="sfb a" style="margin-block-end:27px; padding-block-end:15px;">A<br>B</span>
    <n></n>
    <n></n>
  </div>
</div><div class="igrid" style="grid-template-columns:200px">
  <div class="igrid sfb vl" style="grid: 1fr / 7px 13px 50px; grid-row: span 4;">
    <span class="a" style="margin-block-end:27px; padding-block-end:15px;">A<br>B</span>
    <n></n>
    <n></n>
  </div>
</div><div class="igrid" style="grid-template-columns:200px">
  <div class="igrid sfb vl" style="grid: 1fr / 7px 13px 50px; grid-row: span 4;">
    <span class="jfb a" style="margin-block-end:27px; padding-block-end:15px;">A<br>B</span>
    <n></n>
    <n></n>
  </div>
</div>

<br>

A<div class="igrid slb">
  <div class="igrid slb" style="grid: 7px 13px 100px / 36px 3px; grid-row: span 4;">
    <n></n><n></n>
    <n></n><n></n>
    <span class="slb a" style="margin-bottom:7px; padding-bottom:5px;">A<br>B</span><n></n>
  </div>
  <span class="slb i a" style="grid-row:4">C<br>D</span>
  <n></n>
</div>

</body>
</html>