4 <link href=
"resources/grid.css" rel=
"stylesheet">
7 grid-template-columns: [a]
50px [b]
100px [c]
200px [d];
8 grid-template-rows: [e]
50px [f]
100px [g]
200px [h];
12 grid-template-columns: [b]
50px [b]
100px [b]
200px [b];
13 grid-template-rows: [g]
50px [g]
100px [g]
200px [g];
17 grid-template-columns: [A]
10px [B]
20px [C]
30px [A]
40px [B]
50px [C]
60px [A]
70px [B]
80px [C];
18 grid-template-rows:
100px;
31 .gridItemInvalidNegativeGridLine {
32 grid-column:
1 / -
1 nonexistent;
33 grid-row: span
2 / -
10 nonexistent;
37 grid-column: a / span c;
47 grid-column:
2 b / span
2 b;
51 .gridItemSpan2GNegativeG {
53 grid-row: span
2 g / -
1 g;
56 <script src=
"../../resources/check-layout.js"></script>
58 <body onload=
"checkLayout('.grid')">
60 <p>This test checks that we resolve named grid line per the specification.
</p>
62 <div style=
"position: relative">
63 <div class=
"grid gridWithoutRepeat">
64 <div class=
"sizedToGridArea gridItemBToD" data-offset-x=
"50" data-offset-y=
"0" data-expected-width=
"300" data-expected-height=
"50"></div>
68 <div style=
"position: relative">
69 <div class=
"grid gridWithoutRepeat">
70 <div class=
"sizedToGridArea gridItemGToH" data-offset-x=
"0" data-offset-y=
"150" data-expected-width=
"50" data-expected-height=
"200"></div>
75 <div style=
"position: relative">
76 <div class=
"grid gridWithRepeat">
77 <div class=
"sizedToGridArea gridItemBToD" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"50" data-expected-height=
"50"></div>
81 <div style=
"position: relative">
82 <div class=
"grid gridWithRepeat">
83 <div class=
"sizedToGridArea gridItemGToH" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"50" data-expected-height=
"50"></div>
87 <div style=
"position: relative">
88 <div class=
"grid gridWithoutRepeat">
89 <div class=
"sizedToGridArea gridItemInvalidNegativeGridLine" data-offset-x=
"0" data-offset-y=
"50" data-expected-width=
"350" data-expected-height=
"300"></div>
94 <div style=
"position: relative">
95 <div class=
"grid gridWithoutRepeat">
96 <div class=
"sizedToGridArea gridItemAToSpanC" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"150" data-expected-height=
"50"></div>
100 <div style=
"position: relative">
101 <div class=
"grid gridWithoutRepeat">
102 <div class=
"sizedToGridArea gridItemFToSpanH" data-offset-x=
"0" data-offset-y=
"50" data-expected-width=
"50" data-expected-height=
"300"></div>
106 <div style=
"position: relative">
107 <div class=
"grid gridWithoutRepeat">
108 <!-- There is only one 'b' so we should pick this one. Also span 2 'b' should resolve to the same 'b'.
109 Thus being actually 'b' / span 1. -->
110 <div class=
"sizedToGridArea gridItem2BSpan2B" data-offset-x=
"50" data-offset-y=
"0" data-expected-width=
"100" data-expected-height=
"50"></div>
114 <div style=
"position: relative">
115 <div class=
"grid gridWithoutRepeat">
116 <!-- There is only one 'g' so we should pick this one. Also both initial and final position are equal so
117 this is resolved as span 1 / 'g'. -->
118 <div class=
"sizedToGridArea gridItemSpan2GNegativeG" data-offset-x=
"0" data-offset-y=
"50" data-expected-width=
"50" data-expected-height=
"100"></div>
122 <div style=
"position: relative">
123 <div class=
"grid gridWithRepeat">
124 <!-- There is no 'a' or 'c' so it should default to auto / auto. -->
125 <div class=
"sizedToGridArea gridItemAToSpanC" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"50" data-expected-height=
"50"></div>
129 <div style=
"position: relative">
130 <div class=
"grid gridWithRepeat">
131 <!-- There is no 'f' or 'h' so it should default to auto / auto. -->
132 <div class=
"sizedToGridArea gridItemFToSpanH" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"50" data-expected-height=
"50"></div>
136 <div style=
"position: relative">
137 <div class=
"grid gridWithRepeat">
138 <div class=
"sizedToGridArea gridItem2BSpan2B" data-offset-x=
"50" data-offset-y=
"0" data-expected-width=
"300" data-expected-height=
"50"></div>
142 <div style=
"position: relative">
143 <div class=
"grid gridWithRepeat">
144 <div class=
"sizedToGridArea gridItemSpan2GNegativeG" data-offset-x=
"0" data-offset-y=
"50" data-expected-width=
"50" data-expected-height=
"300"></div>
148 <div style=
"position: relative">
149 <div class=
"grid gridFromSpecs">
150 <div class=
"sizedToGridArea" style=
"grid-column: 4 / auto;" data-offset-x=
"60" data-expected-width=
"40"></div>
154 <div style=
"position: relative">
155 <div class=
"grid gridFromSpecs">
156 <div class=
"sizedToGridArea" style=
"grid-column: auto / 6;" data-offset-x=
"100" data-expected-width=
"50"></div>
160 <div style=
"position: relative">
161 <div class=
"grid gridFromSpecs">
162 <div class=
"sizedToGridArea" style=
"grid-column: C / C -1;" data-offset-x=
"30" data-expected-width=
"330"></div>
166 <div style=
"position: relative">
167 <div class=
"grid gridFromSpecs">
168 <div class=
"sizedToGridArea" style=
"grid-column: C / span C;" data-offset-x=
"30" data-expected-width=
"120"></div>
172 <div style=
"position: relative">
173 <div class=
"grid gridFromSpecs">
174 <div class=
"sizedToGridArea" style=
"grid-column: span C / C -1;" data-offset-x=
"150" data-expected-width=
"210"></div>
178 <div style=
"position: relative">
179 <div class=
"grid gridFromSpecs">
180 <div class=
"sizedToGridArea" style=
"grid-column: span C / span C;" data-offset-x=
"0" data-expected-width=
"10"></div>
184 <div style=
"position: relative">
185 <div class=
"grid gridFromSpecs">
186 <div class=
"sizedToGridArea" style=
"grid-column: 5 / C -1;" data-offset-x=
"100" data-expected-width=
"260"></div>
190 <div style=
"position: relative">
191 <div class=
"grid gridFromSpecs">
192 <div class=
"sizedToGridArea" style=
"grid-column: 5 / span C;" data-offset-x=
"100" data-expected-width=
"50"></div>
196 <div style=
"position: relative">
197 <div class=
"grid gridFromSpecs">
198 <div class=
"sizedToGridArea" style=
"grid-column: 8 / 8;" data-offset-x=
"280" data-expected-width=
"80"></div>
202 <div style=
"position: relative">
203 <div class=
"grid gridFromSpecs">
204 <div class=
"sizedToGridArea" style=
"grid-column: B 2 / span 1;" data-offset-x=
"100" data-expected-width=
"50"></div>