OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 | |
3 <link href="resources/grid.css" rel="stylesheet"> | |
4 <style> | |
5 | |
6 .grid { | |
7 border: 2px solid magenta; | |
8 width: 200px; | |
9 position: relative; | |
10 justify-content: start; | |
11 grid-auto-columns: 157px; | |
12 grid-auto-rows: 25px; | |
13 } | |
14 | |
15 .gridOnlyAutoRepeat { grid-template-columns: repeat(auto-fill, 30px [autobar]); } | |
16 .gridAutoRepeatAndFixedBefore { grid-template-columns: 10px [foo] 20% [bar] repe at(auto-fill, [autofoo] 35px); } | |
17 .gridAutoRepeatAndFixedAfter { grid-template-columns: repeat(auto-fill, [first] 30px [last]) [foo] minmax(60px, 80px) [bar] minmax(45px, max-content); } | |
Manuel Rego
2016/04/22 12:57:03
We don't have any content, so this "max-contet" is
| |
18 .gridAutoRepeatAndFixed { grid-template-columns: [start] repeat(2, 50px [a]) [mi ddle] repeat(auto-fill, [autofoo] 15px [autobar]) minmax(5%, 10%) [end]; } | |
19 .gridMultipleNames { grid-template-columns: [start] 20px [foo] 50% repeat(auto-f ill, [bar] 20px [start foo]) [foo] 10% [end bar]; } | |
20 | |
21 .item { | |
22 background-color: cyan; | |
23 min-height: 100%; | |
Manuel Rego
2016/04/22 12:57:04
Again I believe we don't need this.
| |
24 } | |
25 | |
26 .gap { | |
27 grid-column-gap: 20px; | |
28 grid-row-gap: 15px; | |
Manuel Rego
2016/04/22 12:57:04
grid-row-gap is not needed with only 1 row.
| |
29 } | |
30 | |
31 </style> | |
32 | |
33 <script src="../../resources/testharness.js"></script> | |
34 <script src="../../resources/testharnessreport.js"></script> | |
35 <script src="../../resources/check-layout-th.js"></script> | |
36 | |
37 <body onload="checkLayout('.grid')"> | |
38 <div id="log"></div> | |
39 | |
40 <p>This test checks that repeat(auto-fill, ) syntax works as expected.</p> | |
41 | |
42 <div class="grid gridOnlyAutoRepeat"> | |
43 <div class="item" style="grid-column: 1 / span 6" data-offset-x="0" data-off set-y="0" data-expected-width="180" data-expected-height="25"></div> | |
Manuel Rego
2016/04/22 12:57:04
Super-nit: In the first test of each case you're t
| |
44 </div> | |
45 | |
46 <div class="grid gridOnlyAutoRepeat"> | |
47 <div class="item" style="grid-column: 1 / span 6 autobar" data-offset-x="0" data-offset-y="0" data-expected-width="180" data-expected-height="25"></div> | |
48 </div> | |
49 | |
50 <div class="grid gridOnlyAutoRepeat gap"> | |
51 <div class="item" style="grid-column: 1 / span 5" data-offset-x="0" data-off set-y="0" data-expected-width="357" data-expected-height="25"></div> | |
52 </div> | |
53 | |
54 <div class="grid gridOnlyAutoRepeat gap"> | |
55 <div class="item" style="grid-column: autobar 2 / span 3" data-offset-x="100 " data-offset-y="0" data-expected-width="257" data-expected-height="25"></div> | |
56 </div> | |
57 | |
58 <div class="grid gridAutoRepeatAndFixedBefore"> | |
59 <div class="item" style="grid-column: 1 / span 6" data-offset-x="0" data-off set-y="0" data-expected-width="190" data-expected-height="25"></div> | |
60 </div> | |
61 | |
62 <div class="grid gridAutoRepeatAndFixedBefore"> | |
63 <div class="item" style="grid-column: foo / autofoo" data-offset-x="10" data -offset-y="0" data-expected-width="40" data-expected-height="25"></div> | |
64 </div> | |
65 | |
66 <div class="grid gridAutoRepeatAndFixedBefore"> | |
67 <div class="item" style="grid-column: bar / 5 autofoo" data-offset-x="50" da ta-offset-y="0" data-expected-width="297" data-expected-height="25"></div> | |
68 </div> | |
69 | |
70 <div class="grid gridAutoRepeatAndFixedBefore gap"> | |
71 <div class="item" style="grid-column: 1 / span 4" data-offset-x="0" data-off set-y="0" data-expected-width="180" data-expected-height="25"></div> | |
72 </div> | |
73 | |
74 <div class="grid gridAutoRepeatAndFixedBefore gap"> | |
75 <div class="item" style="grid-column: span 3 / 2 autofoo" data-offset-x="0" data-offset-y="0" data-expected-width="125" data-expected-height="25"></div> | |
76 </div> | |
77 | |
78 <div class="grid gridAutoRepeatAndFixedBefore gap"> | |
79 <div class="item" style="grid-column: notPresent / 3 autofoo" data-offset-x= "377" data-offset-y="0" data-expected-width="157" data-expected-height="25"></di v> | |
Manuel Rego
2016/04/22 12:57:04
Dunno if we really need such complex cases.
Here b
| |
80 </div> | |
81 | |
82 <div class="grid gridAutoRepeatAndFixedAfter"> | |
83 <div class="item" style="grid-column: 1 / span 4" data-offset-x="0" data-off set-y="0" data-expected-width="185" data-expected-height="25"></div> | |
84 </div> | |
85 | |
86 <div class="grid gridAutoRepeatAndFixedAfter"> | |
87 <div class="item" style="grid-column: first / last 2" data-offset-x="0" data -offset-y="0" data-expected-width="60" data-expected-height="25"></div> | |
88 </div> | |
89 | |
90 <div class="grid gridAutoRepeatAndFixedAfter"> | |
91 <div class="item" style="grid-column: last 2 / foo" data-offset-x="60" data- offset-y="0" data-expected-width="80" data-expected-height="25"></div> | |
Manuel Rego
2016/04/22 12:57:03
Again this is pretty confusing "last 2" anf "foo"
| |
92 </div> | |
93 | |
94 <div class="grid gridAutoRepeatAndFixedAfter gap"> | |
95 <div class="item" style="grid-column: 1 / span 3" data-offset-x="0" data-off set-y="0" data-expected-width="195" data-expected-height="25"></div> | |
96 </div> | |
97 | |
98 <div class="grid gridAutoRepeatAndFixedAfter gap"> | |
99 <div class="item" style="grid-column: 3 / span 1 bar" data-offset-x="130" da ta-offset-y="0" data-expected-width="222" data-expected-height="25"></div> | |
100 </div> | |
101 | |
102 <div class="grid gridAutoRepeatAndFixedAfter gap"> | |
103 <div class="item" style="grid-column: first / foo" data-offset-x="0" data-of fset-y="0" data-expected-width="30" data-expected-height="25"></div> | |
104 </div> | |
105 | |
106 <div class="grid gridAutoRepeatAndFixed"> | |
107 <div class="item" style="grid-column: 1 / span 8" data-offset-x="0" data-off set-y="0" data-expected-width="195" data-expected-height="25"></div> | |
108 </div> | |
109 | |
110 <div class="grid gridAutoRepeatAndFixed"> | |
111 <div class="item" style="grid-column: a / autobar 2" data-offset-x="50" data -offset-y="0" data-expected-width="80" data-expected-height="25"></div> | |
112 </div> | |
113 | |
114 <div class="grid gridAutoRepeatAndFixed"> | |
115 <div class="item" style="grid-column: autofoo / end" data-offset-x="100" dat a-offset-y="0" data-expected-width="95" data-expected-height="25"></div> | |
116 </div> | |
117 | |
118 <div class="grid gridAutoRepeatAndFixed gap"> | |
119 <div class="item" style="grid-column: 1 / span 4" data-offset-x="0" data-of fset-y="0" data-expected-width="195" data-expected-height="25"></div> | |
120 </div> | |
121 | |
122 <div class="grid gridAutoRepeatAndFixed gap"> | |
123 <div class="item" style="grid-column: autobar / -1" data-offset-x="175" dat a-offset-y="0" data-expected-width="20" data-expected-height="25"></div> | |
124 </div> | |
125 | |
126 <div class="grid gridMultipleNames"> | |
127 <div class="item" style="grid-column: 1 / -1" data-offset-x="0" data-offset -y="0" data-expected-width="200" data-expected-height="25"></div> | |
128 </div> | |
129 | |
130 <div class="grid gridMultipleNames"> | |
131 <div class="item" style="grid-column: foo 3 / 4 bar" data-offset-x="160" da ta-offset-y="0" data-expected-width="40" data-expected-height="25"></div> | |
132 </div> | |
133 | |
134 <div class="grid gridMultipleNames"> | |
135 <div class="item" style="grid-column: -6 / span 2 start" data-offset-x="20" data-offset-y="0" data-expected-width="140" data-expected-height="25"></div> | |
136 </div> | |
137 | |
138 <div class="grid gridMultipleNames gap"> | |
139 <div class="item" style="grid-column: -4 / -2" data-offset-x="40" data-offs et-y="0" data-expected-width="140" data-expected-height="25"></div> | |
140 </div> | |
141 | |
142 <div class="grid gridMultipleNames gap"> | |
143 <div class="item" style="grid-column: bar / foo 2" data-offset-x="160" data -offset-y="0" data-expected-width="20" data-expected-height="25"></div> | |
144 </div> | |
145 | |
146 <div class="grid gridMultipleNames gap"> | |
147 <div class="item" style="grid-column: foo / bar 2" data-offset-x="40" data- offset-y="0" data-expected-width="180" data-expected-height="25"></div> | |
148 </div> | |
149 | |
150 </body> | |
OLD | NEW |