| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <link href="resources/grid.css" rel="stylesheet"/> | 3 <link href="resources/grid.css" rel="stylesheet"/> |
| 4 <style> | 4 <style> |
| 5 .grid { | 5 .grid { |
| 6 font: 10px/1 Ahem; | 6 font: 10px/1 Ahem; |
| 7 } | 7 } |
| 8 .gridMinContentFixedAndAuto { | 8 .gridMinContentFixedAndAuto { |
| 9 grid-template-columns: minmax(min-content, 15px) auto; | 9 grid-template-columns: minmax(min-content, 15px) auto; |
| 10 } | 10 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 .gridAutoMaxContent { | 35 .gridAutoMaxContent { |
| 36 grid-template-columns: auto max-content; | 36 grid-template-columns: auto max-content; |
| 37 } | 37 } |
| 38 .gridMaxContentAndMinContentFixed { | 38 .gridMaxContentAndMinContentFixed { |
| 39 grid-template-columns: max-content minmax(min-content, 35px); | 39 grid-template-columns: max-content minmax(min-content, 35px); |
| 40 } | 40 } |
| 41 .gridMaxContentAndMaxContentFixed { | 41 .gridMaxContentAndMaxContentFixed { |
| 42 grid-template-columns: max-content minmax(max-content, 35px); | 42 grid-template-columns: max-content minmax(max-content, 35px); |
| 43 } | 43 } |
| 44 .gridMinContentFixedAndFixedFixedAndAuto { |
| 45 grid-template-columns: minmax(min-content, 20px) minmax(20px, 30px) auto; |
| 46 } |
| 47 .gridAutoAndFixedFixedAndMaxContentFixed { |
| 48 grid-template-columns: auto minmax(20px, 30px) minmax(max-content, 20px); |
| 49 } |
| 44 | 50 |
| 45 </style> | 51 </style> |
| 46 <script src="../../resources/js-test.js"></script> | 52 <script src="../../resources/js-test.js"></script> |
| 47 </head> | 53 </head> |
| 48 <body> | 54 <body> |
| 49 <div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAuto"> | 55 <div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAuto"> |
| 50 <div class="firstRowBothColumn">XXXX XXXX</div> | 56 <div class="firstRowBothColumn">XXXX XXXX</div> |
| 51 </div> | 57 </div> |
| 52 | 58 |
| 53 <div class="grid gridAutoAndAuto" id="gridAutoAndAuto"> | 59 <div class="grid gridAutoAndAuto" id="gridAutoAndAuto"> |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 <div class="firstRowSecondColumn">XXXX XXXX</div> | 259 <div class="firstRowSecondColumn">XXXX XXXX</div> |
| 254 <div class="firstRowSecondColumn">XX</div> | 260 <div class="firstRowSecondColumn">XX</div> |
| 255 </div> | 261 </div> |
| 256 | 262 |
| 257 <div class="grid gridMaxContentAndMaxContentFixed" id="gridMaxContentAndMaxConte
ntFixedUnsorted"> | 263 <div class="grid gridMaxContentAndMaxContentFixed" id="gridMaxContentAndMaxConte
ntFixedUnsorted"> |
| 258 <div class="firstRowBothColumn">XXXX XXXX</div> | 264 <div class="firstRowBothColumn">XXXX XXXX</div> |
| 259 <div class="firstRowBothColumn">XX XX XX XX</div> | 265 <div class="firstRowBothColumn">XX XX XX XX</div> |
| 260 <div class="firstRowSecondColumn">XXXXXXX</div> | 266 <div class="firstRowSecondColumn">XXXXXXX</div> |
| 261 </div> | 267 </div> |
| 262 | 268 |
| 269 <!-- The next four force the grid to grow only a particular subset of tracks abo
ve the limits --> |
| 270 <div class="constrainedContainer"> |
| 271 <div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAutoA
boveLimits"> |
| 272 <div class="firstRowBothColumn">XXXX XXXX</div> |
| 273 <div class="firstRowBothColumn">XXXXXXXXXXX</div> |
| 274 </div> |
| 275 </div> |
| 276 |
| 277 <div class="constrainedContainer"> |
| 278 <div class="grid gridMaxContentFixedAndAuto" id="gridMaxContentFixedAndAutoA
boveLimits"> |
| 279 <div class="firstRowBothColumn">XXXX XXXX</div> |
| 280 <div class="firstRowBothColumn">XXXXXXXXXXXXXXX</div> |
| 281 </div> |
| 282 </div> |
| 283 |
| 284 <div class="constrainedContainer"> |
| 285 <div class="grid gridMinContentFixedAndFixedFixedAndAuto" id="gridMinContent
FixedAndFixedFixedAndAuto"> |
| 286 <div class="firstRowBothColumn">XXXX XXXX</div> |
| 287 <div class="firstRowBothColumn">XXXXXXXXXX</div> |
| 288 </div> |
| 289 </div> |
| 290 |
| 291 <div class="constrainedContainer"> |
| 292 <div class="grid gridAutoAndFixedFixedAndMaxContentFixed" id="gridAutoAndFix
edFixedAndMaxContentFixed"> |
| 293 <div class="firstRowBothColumn">XXXX XXXX</div> |
| 294 <div class="firstRowBothColumn">XXXXXXXXXXXXXXX</div> |
| 295 </div> |
| 296 </div> |
| 297 |
| 263 <script> | 298 <script> |
| 264 function testGridColumnsValues(id, computedColumnValue) | 299 function testGridColumnsValues(id, computedColumnValue) |
| 265 { | 300 { |
| 266 shouldBeEqualToString("window.getComputedStyle(" + id + ", '').getPropert
yValue('grid-template-columns')", computedColumnValue); | 301 shouldBeEqualToString("window.getComputedStyle(" + id + ", '').getPropert
yValue('grid-template-columns')", computedColumnValue); |
| 267 } | 302 } |
| 268 | 303 |
| 269 testGridColumnsValues("gridMinContentFixedAndAuto", "15px 75px"); | 304 testGridColumnsValues("gridMinContentFixedAndAuto", "15px 75px"); |
| 270 testGridColumnsValues("gridAutoAndAuto", "45px 45px"); | 305 testGridColumnsValues("gridAutoAndAuto", "45px 45px"); |
| 271 testGridColumnsValues("gridMinContentAndMinContentFixed", "20px 30px"); | 306 testGridColumnsValues("gridMinContentAndMinContentFixed", "20px 30px"); |
| 272 testGridColumnsValues("gridMaxContentAndMinContent", "70px 20px"); | 307 testGridColumnsValues("gridMaxContentAndMinContent", "70px 20px"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 301 testGridColumnsValues("gridMinContentAndMinContentFixedUnsorted", "10px 40px"
); | 336 testGridColumnsValues("gridMinContentAndMinContentFixedUnsorted", "10px 40px"
); |
| 302 testGridColumnsValues("gridMaxContentAndMinContentUnsorted", "0px 70px"); | 337 testGridColumnsValues("gridMaxContentAndMinContentUnsorted", "0px 70px"); |
| 303 testGridColumnsValues("gridFixedMinContentAndMaxContentUnsorted", "10px 70px"
); | 338 testGridColumnsValues("gridFixedMinContentAndMaxContentUnsorted", "10px 70px"
); |
| 304 testGridColumnsValues("gridFixedMaxContentAndMinContentUnsorted", "50px 40px"
); | 339 testGridColumnsValues("gridFixedMaxContentAndMinContentUnsorted", "50px 40px"
); |
| 305 testGridColumnsValues("gridMinContentAndMaxContentFixedUnsorted", "10px 90px"
); | 340 testGridColumnsValues("gridMinContentAndMaxContentFixedUnsorted", "10px 90px"
); |
| 306 testGridColumnsValues("gridMaxContentFixedAndAutoUnsorted", "15px 70px"); | 341 testGridColumnsValues("gridMaxContentFixedAndAutoUnsorted", "15px 70px"); |
| 307 testGridColumnsValues("gridAutoMinContentUnsorted", "50px 60px"); | 342 testGridColumnsValues("gridAutoMinContentUnsorted", "50px 60px"); |
| 308 testGridColumnsValues("gridAutoMaxContentUnsorted", "0px 90px"); | 343 testGridColumnsValues("gridAutoMaxContentUnsorted", "0px 90px"); |
| 309 testGridColumnsValues("gridMaxContentAndMinContentFixedUnsorted", "55px 40px"
); | 344 testGridColumnsValues("gridMaxContentAndMinContentFixedUnsorted", "55px 40px"
); |
| 310 testGridColumnsValues("gridMaxContentAndMaxContentFixedUnsorted", "75px 70px"
); | 345 testGridColumnsValues("gridMaxContentAndMaxContentFixedUnsorted", "75px 70px"
); |
| 346 |
| 347 debug(""); |
| 348 debug("Check that only a subset of tracks grow above track limits."); |
| 349 testGridColumnsValues("gridMinContentFixedAndAutoAboveLimits", "15px 95px"); |
| 350 testGridColumnsValues("gridMaxContentFixedAndAutoAboveLimits", "65px 85px"); |
| 351 testGridColumnsValues("gridMinContentFixedAndFixedFixedAndAuto", "20px 20px 6
0px"); |
| 352 testGridColumnsValues("gridAutoAndFixedFixedAndMaxContentFixed", "40px 20px 9
0px"); |
| 311 </script> | 353 </script> |
| 312 </body> | 354 </body> |
| 313 </html> | 355 </html> |
| OLD | NEW |