OLD | NEW |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link href="resources/grid.css" rel="stylesheet"> | 4 <link href="resources/grid.css" rel="stylesheet"> |
5 <style> | 5 <style> |
6 #gridTemplateWithNone { | 6 #gridTemplateWithNone { |
7 grid-template: none; | 7 grid-template: none; |
8 } | 8 } |
9 #gridTemplateSimpleForm { | 9 #gridTemplateSimpleForm { |
10 grid-template: 10px / 15px; | 10 grid-template: 10px / 15px; |
11 } | 11 } |
12 #gridTemplateSimpleFormWithNoneColumns { | 12 #gridTemplateSimpleFormWithNoneColumns { |
13 grid-template: none / 15px; | 13 grid-template: none / 15px; |
14 } | 14 } |
15 #gridTemplateSimpleFormWithNoneRows { | 15 #gridTemplateSimpleFormWithNoneRows { |
16 grid-template: 10px / none; | 16 grid-template: 10px / none; |
17 } | 17 } |
18 #gridTemplateSimpleFormWithNone { | 18 #gridTemplateSimpleFormWithNone { |
19 grid-template: none / none; | 19 grid-template: none / none; |
20 } | 20 } |
21 #gridTemplateComplexForm { | 21 #gridTemplateComplexForm { |
22 grid-template: 10px / "a" 15px; | 22 grid-template: 10px / "a" 15px; |
23 } | 23 } |
24 #gridTemplateComplexFormWithLineNames { | 24 #gridTemplateComplexFormWithLineNames { |
25 grid-template: 10px / [head] "a" 15px [tail]; | 25 grid-template: 10px / [head] "a" 15px [tail]; |
26 } | 26 } |
27 #gridTemplateComplexFormWithLineNamesWithoutRowSize { | |
28 grid-template: 10px / [head] "a" [tail]; | |
29 } | |
svillar
2016/02/19 11:18:00
As you're adding also a test case with multiple na
Manuel Rego
2016/02/19 12:24:36
Yes, but for the bad values, as that would be inva
| |
27 #gridTemplateComplexFormWithLineNamesMultipleColumns { | 30 #gridTemplateComplexFormWithLineNamesMultipleColumns { |
28 grid-template: 10px / [head] "a b" 15px [tail] | 31 grid-template: 10px / [head] "a b" 15px [tail] |
29 } | 32 } |
33 #gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize { | |
34 grid-template: 10px / [head] "a b" [tail] | |
35 } | |
30 #gridTemplateComplexFormWithLineNamesMultipleRows { | 36 #gridTemplateComplexFormWithLineNamesMultipleRows { |
31 grid-template: 10px / [head1] "a" 15px [tail1] | 37 grid-template: 10px / [head1] "a" 15px [tail1] |
32 [head2] "b" 20px [tail2]; | 38 [head2] "b" 20px [tail2]; |
33 } | 39 } |
40 #gridTemplateComplexFormWithLineNamesMultipleRowsWithoutRowsSizes { | |
41 grid-template: 10px / [head1] "a" [tail1] | |
42 [head2] "b" [tail2]; | |
43 } | |
34 #gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns { | 44 #gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns { |
35 grid-template: [first] 10px repeat(2, [nav nav2] 15px) / "a b c" 100px [nav] | 45 grid-template: [first] 10px repeat(2, [nav nav2] 15px) / "a b c" 100px [nav] |
36 [nav2] "d e f" 25px [nav] | 46 [nav2] "d e f" 25px [nav] |
37 [nav2] "g h i" 25px [last]; | 47 [nav2] "g h i" 25px [last]; |
38 } | 48 } |
49 #gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes { | |
50 grid-template: [first] 10px repeat(2, [nav nav2] 15px) / "a b c" [nav] | |
51 [nav2] "d e f" [nav] | |
52 [nav2] "g h i" [last ]; | |
53 } | |
39 #gridTemplateComplexFormWithAuto { | 54 #gridTemplateComplexFormWithAuto { |
40 grid-template: 10px / "a"; | 55 grid-template: 10px / "a"; |
41 } | 56 } |
42 #gridTemplateComplexFormOnlyAreas { | 57 #gridTemplateComplexFormOnlyAreas { |
43 grid-template: "a"; | 58 grid-template: "a"; |
44 } | 59 } |
45 #gridTemplateNoColumnsRowWithEmptyTrailingLineNames { | 60 #gridTemplateNoColumnsRowWithEmptyTrailingLineNames { |
46 grid-template: [first] "a" auto []; | 61 grid-template: [first] "a" auto []; |
47 } | 62 } |
48 #gridTemplateConsecutiveAreas { | 63 #gridTemplateConsecutiveAreas { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 <script src="../../resources/js-test.js"></script> | 138 <script src="../../resources/js-test.js"></script> |
124 </head> | 139 </head> |
125 <body> | 140 <body> |
126 <div class="grid" id="gridTemplateWithNone"></div> | 141 <div class="grid" id="gridTemplateWithNone"></div> |
127 <div class="grid" id="gridTemplateSimpleForm"></div> | 142 <div class="grid" id="gridTemplateSimpleForm"></div> |
128 <div class="grid" id="gridTemplateSimpleFormWithNoneColumns"></div> | 143 <div class="grid" id="gridTemplateSimpleFormWithNoneColumns"></div> |
129 <div class="grid" id="gridTemplateSimpleFormWithNoneRows"></div> | 144 <div class="grid" id="gridTemplateSimpleFormWithNoneRows"></div> |
130 <div class="grid" id="gridTemplateSimpleFormWithNone"></div> | 145 <div class="grid" id="gridTemplateSimpleFormWithNone"></div> |
131 <div class="grid" id="gridTemplateComplexForm"></div> | 146 <div class="grid" id="gridTemplateComplexForm"></div> |
132 <div class="grid" id="gridTemplateComplexFormWithLineNames"></div> | 147 <div class="grid" id="gridTemplateComplexFormWithLineNames"></div> |
148 <div class="grid" id="gridTemplateComplexFormWithLineNamesWithoutRowSize"></div> | |
133 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleColumns"></div > | 149 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleColumns"></div > |
150 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleColumnsWithout RowSize"></div> | |
134 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleRows"></div> | 151 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleRows"></div> |
152 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleRowsWithoutRow sSizes"></div> | |
135 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns "></div> | 153 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns "></div> |
154 <div class="grid" id="gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns WithoutRowsSizes"></div> | |
136 <div class="grid" id="gridTemplateComplexFormWithAuto"></div> | 155 <div class="grid" id="gridTemplateComplexFormWithAuto"></div> |
137 <div class="grid" id="gridTemplateComplexFormOnlyAreas"></div> | 156 <div class="grid" id="gridTemplateComplexFormOnlyAreas"></div> |
138 <div class="grid" id="gridTemplateNoColumnsRowWithEmptyTrailingLineNames"></div> | 157 <div class="grid" id="gridTemplateNoColumnsRowWithEmptyTrailingLineNames"></div> |
139 <div class="grid" id="gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEm ptyLeadingLineNames"></div> | 158 <div class="grid" id="gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEm ptyLeadingLineNames"></div> |
140 <div class="grid" id="gridTemplateNoColumnsRowWithNonEmptyLeadingLineNamesAndEmp tyTrailingLineNames"></div> | 159 <div class="grid" id="gridTemplateNoColumnsRowWithNonEmptyLeadingLineNamesAndEmp tyTrailingLineNames"></div> |
141 <div class="grid" id="gridTemplateMultipleSlash"></div> | 160 <div class="grid" id="gridTemplateMultipleSlash"></div> |
142 <div class="grid" id="gridTemplateSimpleFormJustColumns"></div> | 161 <div class="grid" id="gridTemplateSimpleFormJustColumns"></div> |
143 <div class="grid" id="gridTemplateSimpleFormNoRows"></div> | 162 <div class="grid" id="gridTemplateSimpleFormNoRows"></div> |
144 <div class="grid" id="gridTemplateSimpleFormNoColumns"></div> | 163 <div class="grid" id="gridTemplateSimpleFormNoColumns"></div> |
145 <div class="grid" id="gridTemplateSimpleFormNoColumnSize"></div> | 164 <div class="grid" id="gridTemplateSimpleFormNoColumnSize"></div> |
(...skipping 19 matching lines...) Expand all Loading... | |
165 description("This test checks that the 'grid-template' shorthand is properly parsed and the longhand properties correctly assigned."); | 184 description("This test checks that the 'grid-template' shorthand is properly parsed and the longhand properties correctly assigned."); |
166 | 185 |
167 debug("Test getting grid-template-areas set through CSS."); | 186 debug("Test getting grid-template-areas set through CSS."); |
168 testGridDefinitionsValues(document.getElementById("gridTemplateWithNone"), " none", "none", "none"); | 187 testGridDefinitionsValues(document.getElementById("gridTemplateWithNone"), " none", "none", "none"); |
169 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleForm"), "10px", "15px", "none"); | 188 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleForm"), "10px", "15px", "none"); |
170 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormWit hNoneColumns"), "none", "15px", "none"); | 189 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormWit hNoneColumns"), "none", "15px", "none"); |
171 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormWit hNoneRows"), "10px", "none", "none"); | 190 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormWit hNoneRows"), "10px", "none", "none"); |
172 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormWit hNone"), "none", "none", "none"); | 191 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormWit hNone"), "none", "none", "none"); |
173 testGridDefinitionsValues(document.getElementById("gridTemplateComplexForm") , "10px", "15px", '"a"'); | 192 testGridDefinitionsValues(document.getElementById("gridTemplateComplexForm") , "10px", "15px", '"a"'); |
174 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNames"), "10px", "[head] 15px [tail]", '"a"'); | 193 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNames"), "10px", "[head] 15px [tail]", '"a"'); |
194 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesWithoutRowSize"), "10px", "[head] 0px [tail]", '"a"'); | |
175 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleColumns"), "10px", "[head] 15px [tail]", '"a b"'); | 195 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleColumns"), "10px", "[head] 15px [tail]", '"a b"'); |
196 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleColumnsWithoutRowSize"), "10px", "[head] 0px [tail]", '"a b"' ); | |
176 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleRows"), "10px", "[head1] 15px [tail1 head2] 20px [tail2]", '" a" "b"'); | 197 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleRows"), "10px", "[head1] 15px [tail1 head2] 20px [tail2]", '" a" "b"'); |
198 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleRowsWithoutRowsSizes"), "10px", "[head1] 0px [tail1 head2] 0p x [tail2]", '"a" "b"'); | |
177 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleRowsAndColumns"), "[first] 10px [nav nav2] 15px [nav nav2] 15 px", "100px [nav nav2] 25px [nav nav2] 25px [last]", '"a b c" "d e f" "g h i"'); | 199 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleRowsAndColumns"), "[first] 10px [nav nav2] 15px [nav nav2] 15 px", "100px [nav nav2] 25px [nav nav2] 25px [last]", '"a b c" "d e f" "g h i"'); |
200 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thLineNamesMultipleRowsAndColumnsWithoutRowsSizes"), "[first] 10px [nav nav2] 15 px [nav nav2] 15px", "0px [nav nav2] 0px [nav nav2] 0px [last]", '"a b c" "d e f " "g h i"'); | |
178 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thAuto"), "10px", "0px", '"a"'); | 201 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWi thAuto"), "10px", "0px", '"a"'); |
179 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormOn lyAreas"), "none", "0px", '"a"'); | 202 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormOn lyAreas"), "none", "0px", '"a"'); |
180 testGridDefinitionsValues(document.getElementById("gridTemplateNoColumnsRowW ithEmptyTrailingLineNames"), "none", "[first] 0px", '"a"'); | 203 testGridDefinitionsValues(document.getElementById("gridTemplateNoColumnsRowW ithEmptyTrailingLineNames"), "none", "[first] 0px", '"a"'); |
181 testGridDefinitionsValues(document.getElementById("gridTemplateConsecutiveAr eas"), "10px", "0px 0px", '"a" "a"'); | 204 testGridDefinitionsValues(document.getElementById("gridTemplateConsecutiveAr eas"), "10px", "0px 0px", '"a" "a"'); |
182 | 205 |
183 debug(""); | 206 debug(""); |
184 debug("Test getting wrong values for grid-template shorthand through CSS (th ey should resolve to the default: 'none')"); | 207 debug("Test getting wrong values for grid-template shorthand through CSS (th ey should resolve to the default: 'none')"); |
185 testGridDefinitionsValues(document.getElementById("gridTemplateMultipleSlash "), "none", "none", "none"); | 208 testGridDefinitionsValues(document.getElementById("gridTemplateMultipleSlash "), "none", "none", "none"); |
186 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormJus tColumns"), "none", "none", "none"); | 209 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormJus tColumns"), "none", "none", "none"); |
187 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormNoR ows"), "none", "none", "none"); | 210 testGridDefinitionsValues(document.getElementById("gridTemplateSimpleFormNoR ows"), "none", "none", "none"); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 testGridDefinitionsSetBadJSValues("none / 'a'"); | 253 testGridDefinitionsSetBadJSValues("none / 'a'"); |
231 testGridDefinitionsSetBadJSValues("25px / 'a' [name] 10px"); | 254 testGridDefinitionsSetBadJSValues("25px / 'a' [name] 10px"); |
232 testGridDefinitionsSetBadJSValues("'a' / 'b'"); | 255 testGridDefinitionsSetBadJSValues("'a' / 'b'"); |
233 testGridDefinitionsSetBadJSValues("15px"); | 256 testGridDefinitionsSetBadJSValues("15px"); |
234 testGridDefinitionsSetBadJSValues("15px / 20px none"); | 257 testGridDefinitionsSetBadJSValues("15px / 20px none"); |
235 testGridDefinitionsSetBadJSValues("25px / 10px 'a'"); | 258 testGridDefinitionsSetBadJSValues("25px / 10px 'a'"); |
236 | 259 |
237 </script> | 260 </script> |
238 </body> | 261 </body> |
239 </html> | 262 </html> |
OLD | NEW |