1 Test that setting and getting grid-template-columns and grid-template-rows works as expected
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Test getting grid-template-columns and grid-template-rows set through CSS
7 PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('grid-template-columns') is "[first] 10px"
8 PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('grid-template-rows') is "[first] 15px"
9 PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('grid-template-columns') is "53% [last]"
10 PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('grid-template-rows') is "27% [last]"
11 PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('grid-template-columns') is "[first] auto"
12 PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('grid-template-rows') is "auto [last]"
13 PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('grid-template-columns') is "[first] minmax(10%, 15px)"
14 PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('grid-template-rows') is "minmax(20px, 50%) [last]"
15 PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('grid-template-columns') is "[first nav] 10px [last]"
16 PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('grid-template-rows') is "[first nav] 15px [last]"
17 PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('grid-template-columns') is "[first nav] 10% [nav] 15% [last]"
18 PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('grid-template-rows') is "[first nav2] 25% [nav2] 75% [last]"
19 PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('grid-template-columns') is "[first] 10px [nav nav2] 50% [nav nav2] 50%"
20 PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('grid-template-rows') is "100px [nav nav2] 25% [nav nav2] 25% [last]"
21 PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('grid-template-columns') is "10px"
22 PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('grid-template-rows') is "20px 50px"
24 Test getting and setting grid-template-columns and grid-template-rows through JS
25 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 18px"
26 PASS element.style.gridTemplateColumns is "[first] 18px"
27 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "66px [last]"
28 PASS element.style.gridTemplateRows is "66px [last]"
29 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 55%"
30 PASS element.style.gridTemplateColumns is "[first] 55%"
31 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "40% [last]"
32 PASS element.style.gridTemplateRows is "40% [last]"
33 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] auto"
34 PASS element.style.gridTemplateColumns is "[first] auto"
35 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "auto [last]"
36 PASS element.style.gridTemplateRows is "auto [last]"
37 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] min-content"
38 PASS element.style.gridTemplateColumns is "[first] min-content"
39 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "min-content [last]"
40 PASS element.style.gridTemplateRows is "min-content [last]"
41 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] max-content"
42 PASS element.style.gridTemplateColumns is "[first] max-content"
43 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "max-content [last]"
44 PASS element.style.gridTemplateRows is "max-content [last]"
45 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(55%, 45px)"
46 PASS element.style.gridTemplateColumns is "[first] minmax(55%, 45px)"
47 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(30px, 40%) [last]"
48 PASS element.style.gridTemplateRows is "minmax(30px, 40%) [last]"
49 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(220px, max-content)"
50 PASS element.style.gridTemplateColumns is "[first] minmax(22em, max-content)"
51 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(max-content, 50px) [last]"
52 PASS element.style.gridTemplateRows is "minmax(max-content, 5em) [last]"
53 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(220px, min-content)"
54 PASS element.style.gridTemplateColumns is "[first] minmax(22em, min-content)"
55 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(min-content, 50px) [last]"
56 PASS element.style.gridTemplateRows is "minmax(min-content, 5em) [last]"
57 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] minmax(min-content, max-content)"
58 PASS element.style.gridTemplateColumns is "[first] minmax(min-content, max-content)"
59 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(max-content, min-content) [last]"
60 PASS element.style.gridTemplateRows is "minmax(max-content, min-content) [last]"
61 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first nav] minmax(min-content, max-content) [last]"
62 PASS element.style.gridTemplateColumns is "[first nav] minmax(min-content, max-content) [last]"
63 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[first nav] minmax(max-content, min-content) [last]"
64 PASS element.style.gridTemplateRows is "[first nav] minmax(max-content, min-content) [last]"
65 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first nav] minmax(min-content, max-content) [nav] auto [last]"
66 PASS element.style.gridTemplateColumns is "[first nav] minmax(min-content, max-content) [nav] auto [last]"
67 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[first nav2] minmax(max-content, min-content) [nav2] minmax(10px, 15px) [last]"
68 PASS element.style.gridTemplateRows is "[first nav2] minmax(max-content, min-content) [nav2] minmax(10px, 15px) [last]"
69 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[foo bar] auto [foo] auto [bar]"
70 PASS element.style.gridTemplateColumns is "[foo bar] auto [foo] auto [bar]"
71 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo bar] auto [foo] auto [bar]"
72 PASS element.style.gridTemplateRows is "[foo bar] auto [foo] auto [bar]"
74 Test getting and setting invalid grid-template-columns and grid-template-rows through JS
75 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
76 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
77 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
78 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
79 PASS successfullyParsed is true