blob: 683fd308367749a5bcf6256583938672480de089 (
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
|
<style>
body {
font-family: 'SerenitySans';
}
.grid-container {
display: grid;
background-color: lightsalmon;
}
.grid-item {
background-color: lightblue;
}
</style>
<!-- Column end and span -->
<!-- There should be a column spanning 8 units, and then one spanning 4 -->
<div class="grid-container" style="
grid-template-columns: repeat(12,minmax(0,5fr));
">
<div class="grid-item" style="
grid-column-end: span 8;
">1</div>
<div class="grid-item" style="
grid-column-end: span 4;
">2</div>
</div>
<!-- Column start span takes priority over column end span -->
<!-- There should be a column spanning 4 units, and then one spanning 8 -->
<div class="grid-container" style="
grid-template-columns: repeat(12,minmax(0,5fr));
">
<div class="grid-item" style="
grid-column-start: span 4;
grid-column-end: span 8;
">1</div>
<div class="grid-item" style="
grid-column-start: span 8;
grid-column-end: span 4;
">2</div>
</div>
<!-- Row end and span -->
<!-- There should be a row spanning 2 units, and then one spanning 3 -->
<div class="grid-container" style="
grid-template-rows: repeat(5, 20px);
">
<div class="grid-item" style="
grid-row-end: span 2;
">1</div>
<div class="grid-item" style="
grid-row-end: span 3;
">2</div>
</div>
<!-- Grid shouldn't expand to 3 columns as having too much span doesn't change size. -->
<!-- The bottom row should take up half the width of the grid. -->
<div class="grid-container" style="
grid-template-columns: 1fr 1fr;
">
<div class="grid-item" style="
grid-column: 1 / span 3;
grid-row: 1;
">1</div>
<div class="grid-item">1</div>
</div>
|