OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <link href="resources/grid.css" rel="stylesheet"> |
| 3 <link href="resources/grid-alignment.css" rel="stylesheet"> |
| 4 <style> |
| 5 .grid { |
| 6 grid-template-columns: 300px 200px 100px; |
| 7 grid-template-rows: 150px 100px 50px; |
| 8 width: 800px; |
| 9 height: 500px; |
| 10 } |
| 11 |
| 12 .gaps { |
| 13 grid-gap: 10px 20px; |
| 14 } |
| 15 </style> |
| 16 |
| 17 <div class="grid contentStart" id="gridContentStart"></div> |
| 18 <div class="grid contentCenter" id="gridContentCenter"></div> |
| 19 <div class="grid contentEnd" id="gridContentEnd"></div> |
| 20 <div class="grid contentSpaceBetween" id="gridContentSpaceBetween"></div> |
| 21 <div class="grid contentSpaceAround" id="gridContentSpaceAround"></div> |
| 22 <div class="grid contentSpaceEvenly" id="gridContentSpaceEvenly"></div> |
| 23 <div class="grid contentStretch" id="gridContentStretch"></div> |
| 24 |
| 25 <div class="grid gaps contentStart" id="gridGapsContentStart"></div> |
| 26 <div class="grid gaps contentCenter" id="gridGapsContentCenter"></div> |
| 27 <div class="grid gaps contentEnd" id="gridGapsContentEnd"></div> |
| 28 <div class="grid gaps contentSpaceBetween" id="gridGapsContentSpaceBetween"></di
v> |
| 29 <div class="grid gaps contentSpaceAround" id="gridGapsContentSpaceAround"></div> |
| 30 <div class="grid gaps contentSpaceEvenly" id="gridGapsContentSpaceEvenly"></div> |
| 31 <div class="grid gaps contentStretch" id="gridGapsContentStretch"></div> |
| 32 |
| 33 <script src="../../resources/js-test.js"></script> |
| 34 <script src="resources/grid-definitions-parsing-utils.js"></script> |
| 35 <script> |
| 36 description("Test that computed style for grid-template-columns and grid-tem
plate-rows works as expected with content alignment and gaps."); |
| 37 |
| 38 testGridDefinitionsValues(document.getElementById("gridContentStart"), "300p
x 200px 100px", "150px 100px 50px"); |
| 39 testGridDefinitionsValues(document.getElementById("gridContentCenter"), "300
px 200px 100px", "150px 100px 50px"); |
| 40 testGridDefinitionsValues(document.getElementById("gridContentEnd"), "300px
200px 100px", "150px 100px 50px"); |
| 41 testGridDefinitionsValues(document.getElementById("gridContentSpaceBetween")
, "300px 200px 100px", "150px 100px 50px"); |
| 42 testGridDefinitionsValues(document.getElementById("gridContentSpaceAround"),
"300px 200px 100px", "150px 100px 50px"); |
| 43 testGridDefinitionsValues(document.getElementById("gridContentSpaceEvenly"),
"300px 200px 100px", "150px 100px 50px"); |
| 44 testGridDefinitionsValues(document.getElementById("gridContentStretch"), "30
0px 200px 100px", "150px 100px 50px"); |
| 45 |
| 46 testGridDefinitionsValues(document.getElementById("gridGapsContentStart"), "
300px 200px 100px", "150px 100px 50px"); |
| 47 testGridDefinitionsValues(document.getElementById("gridGapsContentCenter"),
"300px 200px 100px", "150px 100px 50px"); |
| 48 testGridDefinitionsValues(document.getElementById("gridGapsContentEnd"), "30
0px 200px 100px", "150px 100px 50px"); |
| 49 testGridDefinitionsValues(document.getElementById("gridGapsContentSpaceBetwe
en"), "300px 200px 100px", "150px 100px 50px"); |
| 50 testGridDefinitionsValues(document.getElementById("gridGapsContentSpaceAroun
d"), "300px 200px 100px", "150px 100px 50px"); |
| 51 testGridDefinitionsValues(document.getElementById("gridGapsContentSpaceEvenl
y"), "300px 200px 100px", "150px 100px 50px"); |
| 52 testGridDefinitionsValues(document.getElementById("gridGapsContentStretch"),
"300px 200px 100px", "150px 100px 50px"); |
| 53 </script> |
OLD | NEW |