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 #gridWithNone { | 6 #gridWithNone { |
7 grid: none; | 7 grid: none; |
8 } | 8 } |
9 .gridWithTemplate { | 9 .gridWithTemplate { |
10 grid: 15px / 10px; | 10 grid: 15px / 10px; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 debug(""); | 81 debug(""); |
82 debug("Test getting wrong values for 'grid' shorthand through CSS (they shou
ld resolve to the default: 'none')"); | 82 debug("Test getting wrong values for 'grid' shorthand through CSS (they shou
ld resolve to the default: 'none')"); |
83 testGridDefinitionsValues(document.getElementById("gridWithExplicitAndImplic
it"), "none", "none", "none", "row", "auto", "auto"); | 83 testGridDefinitionsValues(document.getElementById("gridWithExplicitAndImplic
it"), "none", "none", "none", "row", "auto", "auto"); |
84 testGridDefinitionsValues(document.getElementById("gridWithMisplacedNone1"),
"none", "none", "none", "row", "auto", "auto"); | 84 testGridDefinitionsValues(document.getElementById("gridWithMisplacedNone1"),
"none", "none", "none", "row", "auto", "auto"); |
85 testGridDefinitionsValues(document.getElementById("gridWithMisplacedNone2"),
"none", "none", "none", "row", "auto", "auto"); | 85 testGridDefinitionsValues(document.getElementById("gridWithMisplacedNone2"),
"none", "none", "none", "row", "auto", "auto"); |
86 testGridDefinitionsValues(document.getElementById("gridWithMisplacedDense"),
"none", "none", "none", "row", "auto", "auto"); | 86 testGridDefinitionsValues(document.getElementById("gridWithMisplacedDense"),
"none", "none", "none", "row", "auto", "auto"); |
87 | 87 |
88 debug(""); | 88 debug(""); |
89 debug("Test getting and setting 'grid' shorthand through JS"); | 89 debug("Test getting and setting 'grid' shorthand through JS"); |
90 testGridDefinitionsSetJSValues("10px / 20px", "10px", "20px", "none", "row",
"auto", "auto", "10px", "20px", "none", "initial", "initial", "initial"); | 90 testGridDefinitionsSetJSValues("10px / 20px", "10px", "20px", "none", "row",
"auto", "auto", "10px", "20px", "none", "initial", "initial", "initial"); |
91 testGridDefinitionsSetJSValues("10px / (line) 'a' 20px", "10px", "(line) 20p
x", "\"a\"", "row", "auto", "auto", "10px", "(line) 20px", "\"a\"", "initial", "
initial", "initial"); | 91 testGridDefinitionsSetJSValues("10px / [line] 'a' 20px", "10px", "[line] 20p
x", "\"a\"", "row", "auto", "auto", "10px", "[line] 20px", "\"a\"", "initial", "
initial", "initial"); |
92 testGridDefinitionsSetJSValues("row dense 20px", "none", "none", "none", "ro
w dense", "20px", "20px", "initial", "initial", "initial", "row dense", "20px",
"20px"); | 92 testGridDefinitionsSetJSValues("row dense 20px", "none", "none", "none", "ro
w dense", "20px", "20px", "initial", "initial", "initial", "row dense", "20px",
"20px"); |
93 testGridDefinitionsSetJSValues("column 20px / 10px", "none", "none", "none",
"column", "20px", "10px", "initial", "initial", "initial", "column", "20px", "1
0px"); | 93 testGridDefinitionsSetJSValues("column 20px / 10px", "none", "none", "none",
"column", "20px", "10px", "initial", "initial", "initial", "column", "20px", "1
0px"); |
94 | 94 |
95 debug(""); | 95 debug(""); |
96 debug("Test the initial value"); | 96 debug("Test the initial value"); |
97 var element = document.createElement("div"); | 97 var element = document.createElement("div"); |
98 document.body.appendChild(element); | 98 document.body.appendChild(element); |
99 testGridDefinitionsValues(element, "none", "none", "none", "row", "auto", "a
uto"); | 99 testGridDefinitionsValues(element, "none", "none", "none", "row", "auto", "a
uto"); |
100 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-template-colu
mns')", "'none'"); | 100 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-template-colu
mns')", "'none'"); |
101 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-template-rows
')", "'none'"); | 101 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-template-rows
')", "'none'"); |
102 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-template-area
s')", "'none'"); | 102 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-template-area
s')", "'none'"); |
103 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-auto-flow')",
"'row'"); | 103 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-auto-flow')",
"'row'"); |
104 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-auto-columns'
)", "'auto'"); | 104 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-auto-columns'
)", "'auto'"); |
105 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-auto-rows')",
"'auto'"); | 105 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-auto-rows')",
"'auto'"); |
106 | 106 |
107 debug(""); | 107 debug(""); |
108 debug("Test setting grid-template-columns and grid-template-rows back to 'no
ne' through JS"); | 108 debug("Test setting grid-template-columns and grid-template-rows back to 'no
ne' through JS"); |
109 testGridDefinitionsSetJSValues("column 10px / 20px", "none", "none", "none",
"column", "10px", "20px", "initial", "initial", "initial", "column", "10px", "2
0px"); | 109 testGridDefinitionsSetJSValues("column 10px / 20px", "none", "none", "none",
"column", "10px", "20px", "initial", "initial", "initial", "column", "10px", "2
0px"); |
110 testGridDefinitionsSetJSValues("none", "none", "none", "none", "row", "auto"
, "auto", "none", "none", "none", "initial", "initial", "initial"); | 110 testGridDefinitionsSetJSValues("none", "none", "none", "none", "row", "auto"
, "auto", "none", "none", "none", "initial", "initial", "initial"); |
111 | 111 |
112 </script> | 112 </script> |
113 </body> | 113 </body> |
114 </html> | 114 </html> |
OLD | NEW |