OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <link href="resources/grid.css" rel="stylesheet"> |
| 3 <style> |
| 4 |
| 5 .grid { |
| 6 grid-template-columns: 200px 300px; |
| 7 grid-template-rows: 150px 250px; |
| 8 grid-auto-columns: 100px; |
| 9 grid-auto-rows: 50px; |
| 10 width: 800px; |
| 11 height: 600px; |
| 12 border: 5px solid black; |
| 13 margin: 30px; |
| 14 padding: 15px; |
| 15 /* Ensures that the grid container is the containing block of the absolutely
positioned grid children. */ |
| 16 position: relative; |
| 17 } |
| 18 |
| 19 .absolute { |
| 20 position: absolute; |
| 21 top: 0; |
| 22 left: 0; |
| 23 width: 100%; |
| 24 height: 100%; |
| 25 background: cyan; |
| 26 } |
| 27 |
| 28 .sixRowsAndSixColumns { |
| 29 background: magenta; |
| 30 grid-row: -5 / 5; |
| 31 grid-column: -5 / 5; |
| 32 } |
| 33 |
| 34 </style> |
| 35 <script src="../../resources/testharness.js"></script> |
| 36 <script src="../../resources/testharnessreport.js"></script> |
| 37 <script src="../../resources/check-layout-th.js"></script> |
| 38 <body onload="checkLayout('.grid')"> |
| 39 <div id="log"></div> |
| 40 |
| 41 <p>This test checks that positioned grid items are placed properly (ignoring imp
licit tracks) even if the grid has implicit tracks.</p> |
| 42 |
| 43 <div class="grid"> |
| 44 <div class="sixRowsAndSixColumns" |
| 45 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 46 </div> |
| 47 <div class="absolute" style="grid-column: auto / 1; grid-row: auto / 1;" |
| 48 data-offset-x="0" data-offset-y="0" data-expected-width="215" data-expec
ted-height="115"> |
| 49 </div> |
| 50 </div> |
| 51 |
| 52 <div class="grid"> |
| 53 <div class="sixRowsAndSixColumns" |
| 54 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 55 </div> |
| 56 <div class="absolute" style="grid-column: auto / 2; grid-row: auto / 2;" |
| 57 data-offset-x="0" data-offset-y="0" data-expected-width="415" data-expec
ted-height="265"> |
| 58 </div> |
| 59 </div> |
| 60 |
| 61 <div class="grid"> |
| 62 <div class="sixRowsAndSixColumns" |
| 63 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 64 </div> |
| 65 <div class="absolute" style="grid-column: 3 / auto; grid-row: 3 / auto;" |
| 66 data-offset-x="715" data-offset-y="515" data-expected-width="115" data-e
xpected-height="115"> |
| 67 </div> |
| 68 </div> |
| 69 |
| 70 <div class="grid"> |
| 71 <div class="sixRowsAndSixColumns" |
| 72 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 73 </div> |
| 74 <div class="absolute" style="grid-column: 2 / auto; grid-row: 2 / auto;" |
| 75 data-offset-x="415" data-offset-y="265" data-expected-width="415" data-e
xpected-height="365"> |
| 76 </div> |
| 77 </div> |
| 78 |
| 79 <div class="grid"> |
| 80 <div class="sixRowsAndSixColumns" |
| 81 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 82 </div> |
| 83 <div class="absolute" style="grid-column: -4 / 1; grid-row: -4 / 1;" |
| 84 data-offset-x="0" data-offset-y="0" data-expected-width="215" data-expec
ted-height="115"> |
| 85 </div> |
| 86 </div> |
| 87 |
| 88 <div class="grid"> |
| 89 <div class="sixRowsAndSixColumns" |
| 90 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 91 </div> |
| 92 <div class="absolute" style="grid-column: -4 / 2; grid-row: -4 / 2;" |
| 93 data-offset-x="0" data-offset-y="0" data-expected-width="415" data-expec
ted-height="265"> |
| 94 </div> |
| 95 </div> |
| 96 |
| 97 <div class="grid"> |
| 98 <div class="sixRowsAndSixColumns" |
| 99 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 100 </div> |
| 101 <div class="absolute" style="grid-column: 3 / 4; grid-row: 3 / 4;" |
| 102 data-offset-x="715" data-offset-y="515" data-expected-width="115" data-e
xpected-height="115"> |
| 103 </div> |
| 104 </div> |
| 105 |
| 106 <div class="grid"> |
| 107 <div class="sixRowsAndSixColumns" |
| 108 data-offset-x="15" data-offset-y="15" data-expected-width="900" data-exp
ected-height="600"> |
| 109 </div> |
| 110 <div class="absolute" style="grid-column: 2 / 4; grid-row: 2 / 4;" |
| 111 data-offset-x="415" data-offset-y="265" data-expected-width="415" data-e
xpected-height="365"> |
| 112 </div> |
| 113 </div> |
| 114 |
| 115 </body> |
OLD | NEW |