blob: 4218f3c8e83a52a343d78783c27cedbf5a19be28 (
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
|
<!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: Placement involving negative line numbers</title>
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1215957">
<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-placement-int">
<link rel="match" href="grid-placement-negative-lines-001-ref.html">
<style type="text/css">
body,html { color:black; background:white; font-size:12px; padding:0; margin:0; }
.grid {
display: grid;
position: relative;
border: 1px solid;
grid-template-columns: 60px [A] 60px 60px;
grid-auto-columns: 40px;
grid-auto-rows: 15px;
grid-gap: 1px;
}
x {
background: lime;
border: 1px solid;
}
y {
position: absolute;
border: 1px solid blue;
bottom:0;height:0;left:0;right:0;
grid-row-end:span 1!important;
}
.a2 { bottom:2px; }
.a3 { bottom:4px; }
.a4 { bottom:6px; }
.a5 { bottom:8px; }
</style>
</head>
<body>
<pre>
grid-template-columns: 60px [A] 60px 60px;
grid-auto-columns: 40px;
grid-gap: 1px;
</pre>
<pre>grid-column-start:</pre>
<div class="grid" style="padding-right:13px; border-right-width:5px">
<x style="grid-row:1; grid-column:1; background:grey"></x>
<x style="grid-row:2; grid-column-start:-1">-1</x>
<x style="grid-row:3; grid-column-start:4">4</x>
<x style="grid-row:3; grid-column-start:-2">-2</x>
<x style="grid-row:3; grid-column-start:-3">-3</x>
<x style="grid-row:3; grid-column-start:-4">-4</x>
<x style="grid-row:3; grid-column-start:-5">-5</x>
<x style="grid-row:4; grid-column-start:A -1">A -1</x>
<x style="grid-row:4; grid-column-start:B -1">B -1</x>
<x style="grid-row:5; grid-column-start:A -2">A -2</x>
<x style="grid-row:6; grid-column-start:A -3">A -3</x>
<x style="grid-row:6; grid-column-start:A -4">A -4</x>
<x style="grid-row:6; grid-column-start:A -5">A -5</x>
<x style="grid-row:7; grid-column-start:A">A</x>
<x style="grid-row:7; grid-column-start:B">B</x>
<x style="grid-row:8; grid-column-start:A 1">A 1</x>
<x style="grid-row:8; grid-column-start:A 2">A 2</x>
<x style="grid-row:8; grid-column-start:A 3">A 3</x>
<x style="grid-row:8; grid-column-start:A 4">A 4</x>
<x style="grid-row:8; grid-column-start:A 5">A 5</x>
<y style="grid-row:2; grid-column-start:-1"></y>
<y style="grid-row:3; grid-column-start:4"></y>
<y style="grid-row:3; grid-column-start:-2" class="a2"></y>
<y style="grid-row:3; grid-column-start:-3" class="a3"></y>
<y style="grid-row:3; grid-column-start:-4" class="a4"></y>
<y style="grid-row:3; grid-column-start:-5" class="a5"></y>
<y style="grid-row:4; grid-column-start:A -1"></y>
<y style="grid-row:4; grid-column-start:B -1" class="a2"></y>
<y style="grid-row:5; grid-column-start:A -2"></y>
<y style="grid-row:6; grid-column-start:A -3"></y>
<y style="grid-row:6; grid-column-start:A -4" class="a2"></y>
<y style="grid-row:6; grid-column-start:A -5" class="a3"></y>
<y style="grid-row:7; grid-column-start:A"></y>
<y style="grid-row:7; grid-column-start:B" class="a2"></y>
<y style="grid-row:8; grid-column-start:A 1"></y>
<y style="grid-row:8; grid-column-start:A 2" class="a2"></y>
<y style="grid-row:8; grid-column-start:A 3" class="a3"></y>
<y style="grid-row:8; grid-column-start:A 4" class="a4"></y>
<y style="grid-row:8; grid-column-start:A 5" class="a5"></y>
</div>
<pre>grid-column-end:</pre>
<div class="grid" style="padding-left:13px;">
<x style="grid-row:1; grid-column:1; background:grey"></x>
<x style="grid-row:2; grid-column-end:-1">-1</x>
<x style="grid-row:3; grid-column-end:4">4</x>
<x style="grid-row:3; grid-column-end:-5">-5</x>
<x style="grid-row:3; grid-column-end:-4">-4</x>
<x style="grid-row:3; grid-column-end:-3">-3</x>
<x style="grid-row:3; grid-column-end:-2">-2</x>
<x style="grid-row:4; grid-column-end:A -1">A -1</x>
<x style="grid-row:4; grid-column-end:B -1">B -1</x>
<x style="grid-row:5; grid-column-end:A -2">A -2</x>
<x style="grid-row:6; grid-column-end:A -3">A -3</x>
<x style="grid-row:6; grid-column-end:A -4">A -4</x>
<x style="grid-row:6; grid-column-end:A -5">A -5</x>
<x style="grid-row:7; grid-column-end:A">A</x>
<x style="grid-row:7; grid-column-end:B">B</x>
<x style="grid-row:8; grid-column-end:A 1">A 1</x>
<x style="grid-row:8; grid-column-end:A 2">A 2</x>
<x style="grid-row:8; grid-column-end:A 3">A 3</x>
<x style="grid-row:8; grid-column-end:A 4">A 4</x>
<x style="grid-row:8; grid-column-end:A 5">A 5</x>
<y style="grid-row:2; grid-column-end:-1"></y>
<y style="grid-row:3; grid-column-end:4"></y>
<y style="grid-row:3; grid-column-end:-5" class="a2"></y>
<y style="grid-row:3; grid-column-end:-4" class="a3"></y>
<y style="grid-row:3; grid-column-end:-3" class="a4"></y>
<y style="grid-row:3; grid-column-end:-2" class="a5"></y>
<y style="grid-row:4; grid-column-end:A -1"></y>
<y style="grid-row:4; grid-column-end:B -1" class="a2"></y>
<y style="grid-row:5; grid-column-end:A -2"></y>
<y style="grid-row:6; grid-column-end:A -3"></y>
<y style="grid-row:6; grid-column-end:A -4" class="a2"></y>
<y style="grid-row:6; grid-column-end:A -5" class="a3"></y>
<y style="grid-row:7; grid-column-end:A"></y>
<y style="grid-row:7; grid-column-end:B" class="a2"></y>
<y style="grid-row:8; grid-column-end:A 1"></y>
<y style="grid-row:8; grid-column-end:A 2" class="a2"></y>
<y style="grid-row:8; grid-column-end:A 3" class="a3"></y>
<y style="grid-row:8; grid-column-end:A 4" class="a4"></y>
<y style="grid-row:8; grid-column-end:A 5" class="a5"></y>
</div>
<pre>grid-column: / span A 2</pre>
<div class="grid">
<x style="grid-row:1; grid-column:1; background:grey"></x>
<x style="grid-row:2; grid-column:-1/span A 2">-1</x>
<x style="grid-row:3; grid-column:4/span A 2">4</x>
<x style="grid-row:4; grid-column:-2/span A 2">-2</x>
<x style="grid-row:5; grid-column:-3/span A 2">-3</x>
<x style="grid-row:6; grid-column:-4/span A 2">-4</x>
<x style="grid-row:7; grid-column:-5/span A 2">-5</x>
<x style="grid-row:8; grid-column:A -1/span A 2">A -1</x>
<x style="grid-row:9; grid-column:B -1/span A 2">B -1</x>
<x style="grid-row:10; grid-column:A -2/span A 2">A -2</x>
<x style="grid-row:11; grid-column:A -3/span A 2">A -3</x>
<x style="grid-row:12; grid-column:A -4/span A 2">A -4</x>
<x style="grid-row:13; grid-column:A -5/span A 2">A -5</x>
<x style="grid-row:14; grid-column:A/span A 2">A</x>
<x style="grid-row:15; grid-column:B/span B">B</x>
<x style="grid-row:16; grid-column:A 1/span A 2">A 1</x>
<x style="grid-row:17; grid-column:A 2/span A 2">A 2</x>
<x style="grid-row:18; grid-column:A 3/span A 2">A 3</x>
<x style="grid-row:19; grid-column:A 4/span A 2">A 4</x>
<x style="grid-row:20; grid-column:A 5/span A 2">A 5</x>
<y style="grid-row:2; grid-column:-1/span A 2"></y>
<y style="grid-row:3; grid-column:4/span A 2"></y>
<y style="grid-row:4; grid-column:-2/span A 2"></y>
<y style="grid-row:5; grid-column:-3/span A 2"></y>
<y style="grid-row:6; grid-column:-4/span A 2"></y>
<y style="grid-row:7; grid-column:-5/span A 2"></y>
<y style="grid-row:8; grid-column:A -1/span A 2"></y>
<y style="grid-row:9; grid-column:B -1/span A 2"></y>
<y style="grid-row:10; grid-column:A -2/span A 2"></y>
<y style="grid-row:11; grid-column:A -3/span A 2"></y>
<y style="grid-row:12; grid-column:A -4/span A 2"></y>
<y style="grid-row:13; grid-column:A -5/span A 2"></y>
<y style="grid-row:14; grid-column:A/span A 2"></y>
<y style="grid-row:15; grid-column:B/span B"></y>
<y style="grid-row:16; grid-column:A 1/span A 2"></y>
<y style="grid-row:17; grid-column:A 2/span A 2"></y>
<y style="grid-row:18; grid-column:A 3/span A 2"></y>
<y style="grid-row:19; grid-column:A 4/span A 2"></y>
<y style="grid-row:20; grid-column:A 5/span A 2"></y>
</div>
</body>
</html>
|