OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <link href="resources/grid.css" rel="stylesheet"> |
| 5 <style type="text/css"> |
| 6 |
| 7 .gridAreas { |
| 8 grid-template-areas: ". a a" |
| 9 "c a a" |
| 10 ". . d"; |
| 11 } |
| 12 |
| 13 .gridNoLineNames { |
| 14 grid-template-columns: 50px 100px 200px; |
| 15 grid-template-rows: 50px 100px 200px; |
| 16 } |
| 17 |
| 18 .gridUniqueNames { |
| 19 grid-template-columns: (a) 50px (b b-start) 100px (c) 200px (d); |
| 20 grid-template-rows: (e) 50px (f) 100px (g g-start) 200px (h); |
| 21 } |
| 22 |
| 23 .gridWithNamedLineBeforeGridArea { |
| 24 grid-template-columns: (a-start c-start) 50px (d-start) 100px 200px; |
| 25 grid-template-rows: (c-start) 50px (d-start) 100px 200px; |
| 26 } |
| 27 |
| 28 .gridWithNamedLineAfterGridArea { |
| 29 grid-template-columns: 50px 100px (a-start) 200px; |
| 30 grid-template-rows: 50px 100px (c-start) 200px; |
| 31 } |
| 32 |
| 33 .gridWithEndLines { |
| 34 grid-template-columns: 50px 100px (a-end) 200px (c-end); |
| 35 grid-template-rows: 50px (c-end) 100px (d-end) 200px; |
| 36 } |
| 37 |
| 38 .gridRepeatedNames { |
| 39 grid-template-columns: (d-start) 50px (d-start) 100px (d-start) 200px; |
| 40 grid-template-rows: 50px (c-end) 100px (c-end) 200px (c-end); |
| 41 } |
| 42 |
| 43 </style> |
| 44 <script src="../../resources/check-layout.js"></script> |
| 45 </head> |
| 46 <body onload="checkLayout('.grid')"> |
| 47 |
| 48 <p>This test checks that we resolve named grid line per the specification.</p> |
| 49 |
| 50 <!-- Check positioning using unique grid-line names --> |
| 51 <div style="position: relative"> |
| 52 <div class="grid gridUniqueNames"> |
| 53 <div class="sizedToGridArea" style="grid-column: b;" data-offset-x="50" data
-offset-y="0" data-expected-width="100" data-expected-height="50"></div> |
| 54 <div class="sizedToGridArea" style="grid-row: e;" data-offset-x="0" data-off
set-y="0" data-expected-width="50" data-expected-height="50"></div> |
| 55 <div class="sizedToGridArea" style="grid-column: b-start;" data-offset-x="50
" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> |
| 56 <div class="sizedToGridArea" style="grid-row: g-start;" data-offset-x="0" da
ta-offset-y="150" data-expected-width="50" data-expected-height="200"></div> |
| 57 </div> |
| 58 </div> |
| 59 |
| 60 <div style="position: relative"> |
| 61 <div class="grid gridUniqueNames"> |
| 62 <div class="sizedToGridArea" style="grid-column: b / d;" data-offset-x="50"
data-offset-y="0" data-expected-width="300" data-expected-height="50"></div> |
| 63 <div class="sizedToGridArea" style="grid-row: g / h;" data-offset-x="0" data
-offset-y="150" data-expected-width="50" data-expected-height="200"></div> |
| 64 <div class="sizedToGridArea" style="grid-column: c; grid-row: f;" data-offse
t-x="150" data-offset-y="50" data-expected-width="200" data-expected-height="100
"></div> |
| 65 </div> |
| 66 </div> |
| 67 |
| 68 <!-- Check positioning using unique grid-line names mixed with integers --> |
| 69 <div style="position: relative"> |
| 70 <div class="grid gridUniqueNames"> |
| 71 <div class="sizedToGridArea" style="grid-column: b / 4;" data-offset-x="50"
data-offset-y="0" data-expected-width="300" data-expected-height="50"></div> |
| 72 <div class="sizedToGridArea" style="grid-row: 3 / h;" data-offset-x="0" data
-offset-y="150" data-expected-width="50" data-expected-height="200"></div> |
| 73 <div class="sizedToGridArea" style="grid-column: 2; grid-row: g;" data-offse
t-x="50" data-offset-y="150" data-expected-width="100" data-expected-height="200
"></div> |
| 74 <div class="sizedToGridArea" style="grid-column: a; grid-row: 2;" data-offse
t-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"><
/div> |
| 75 </div> |
| 76 </div> |
| 77 |
| 78 <!-- Check that without named gridAreas there are no implicit grid-line names de
fined --> |
| 79 <div style="position: relative"> |
| 80 <div class="grid gridUniqueNames"> |
| 81 <div class="sizedToGridArea" style="grid-column: c-start;" data-offset-x="0"
data-offset-y="0" data-expected-width="50" data-expected-height="50"></div> |
| 82 <div class="sizedToGridArea" style="grid-row: f-start;" data-offset-x="0" da
ta-offset-y="0" data-expected-width="50" data-expected-height="50"></div> |
| 83 <div class="sizedToGridArea" style="grid-column: c-start; grid-row: f-end" d
ata-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height
="50"></div> |
| 84 <div class="sizedToGridArea" style="grid-column: b-end; grid-row: h-start" d
ata-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height
="50"></div> |
| 85 </div> |
| 86 </div> |
| 87 |
| 88 <!-- Check that gridArea's implicit names are well defined --> |
| 89 <div style="position: relative"> |
| 90 <div class="grid gridAreas gridNoLineNames"> |
| 91 <div class="sizedToGridArea" style="grid-column: a-start; grid-row: d-start;
" data-offset-x="50" data-offset-y="150" data-expected-width="100" data-expected
-height="200"></div> |
| 92 <div class="sizedToGridArea" style="grid-column: a-start; grid-row: d;" data
-offset-x="50" data-offset-y="150" data-expected-width="100" data-expected-heigh
t="200"></div> |
| 93 <div class="sizedToGridArea" style="grid-column: d-start; grid-row: c-start;
" data-offset-x="150" data-offset-y="50" data-expected-width="200" data-expected
-height="100"></div> |
| 94 </div> |
| 95 </div> |
| 96 |
| 97 <!-- Check positioning using grid areas --> |
| 98 <div style="position: relative"> |
| 99 <div class="grid gridAreas gridNoLineNames"> |
| 100 <div class="sizedToGridArea" style="grid-column: d;" data-offset-x="150" dat
a-offset-y="0" data-expected-width="200" data-expected-height="50"></div> |
| 101 <div class="sizedToGridArea" style="grid-row: d;" data-offset-x="0" data-off
set-y="150" data-expected-width="50" data-expected-height="200"></div> |
| 102 <div class="sizedToGridArea" style="grid-column: c;" data-offset-x="0" data-
offset-y="0" data-expected-width="50" data-expected-height="50"></div> |
| 103 <div class="sizedToGridArea" style="grid-row: c;" data-offset-x="0" data-off
set-y="50" data-expected-width="50" data-expected-height="100"></div> |
| 104 </div> |
| 105 </div> |
| 106 |
| 107 <div style="position: relative"> |
| 108 <div class="grid gridAreas gridNoLineNames"> |
| 109 <div class="sizedToGridArea" style="grid-column: a;" data-offset-x="50" data
-offset-y="0" data-expected-width="300" data-expected-height="50"></div> |
| 110 <div class="sizedToGridArea" style="grid-row: a;" data-offset-x="0" data-off
set-y="0" data-expected-width="50" data-expected-height="150"></div> |
| 111 <div class="sizedToGridArea" style="grid-column: a; grid-row: a;" data-offse
t-x="50" data-offset-y="0" data-expected-width="300" data-expected-height="150">
</div> |
| 112 </div> |
| 113 </div> |
| 114 |
| 115 <!-- Use grid area's implicit line names if defined before explicitly named grid
lines --> |
| 116 <div style="position: relative"> |
| 117 <div class="grid gridAreas gridWithNamedLineAfterGridArea"> |
| 118 <div class="sizedToGridArea" style="grid-column: d;" data-offset-x="150" dat
a-offset-y="0" data-expected-width="200" data-expected-height="50"></div> |
| 119 <div class="sizedToGridArea" style="grid-row: d;" data-offset-x="0" data-off
set-y="150" data-expected-width="50" data-expected-height="200"></div> |
| 120 <div class="sizedToGridArea" style="grid-column: c;" data-offset-x="0" data-
offset-y="0" data-expected-width="50" data-expected-height="50"></div> |
| 121 <div class="sizedToGridArea" style="grid-row: c;" data-offset-x="0" data-off
set-y="50" data-expected-width="50" data-expected-height="100"></div> |
| 122 </div> |
| 123 </div> |
| 124 |
| 125 <div style="position: relative"> |
| 126 <div class="grid gridAreas gridWithNamedLineAfterGridArea"> |
| 127 <div class="sizedToGridArea" style="grid-column-start: a-start;" data-offset
-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></
div> |
| 128 <div class="sizedToGridArea" style="grid-row-start: c-start;" data-offset-x=
"0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div
> |
| 129 </div> |
| 130 </div> |
| 131 |
| 132 <div style="position: relative"> |
| 133 <div class="grid gridAreas gridWithNamedLineAfterGridArea"> |
| 134 <div class="sizedToGridArea" style="grid-column: a;" data-offset-x="50" data
-offset-y="0" data-expected-width="300" data-expected-height="50"></div> |
| 135 <div class="sizedToGridArea" style="grid-row: d;" data-offset-x="0" data-off
set-y="150" data-expected-width="50" data-expected-height="200"></div> |
| 136 <div class="sizedToGridArea" style="grid-column: a; grid-row: d;" data-offse
t-x="50" data-offset-y="150" data-expected-width="300" data-expected-height="200
"></div> |
| 137 </div> |
| 138 </div> |
| 139 |
| 140 <!-- Use explicitly named grid lines if they're defined before the grid area --> |
| 141 <div style="position: relative"> |
| 142 <div class="grid gridAreas gridWithNamedLineBeforeGridArea"> |
| 143 <div class="sizedToGridArea" style="grid-column: d;" data-offset-x="50" data
-offset-y="0" data-expected-width="300" data-expected-height="50"></div> |
| 144 <div class="sizedToGridArea" style="grid-row: d;" data-offset-x="0" data-off
set-y="50" data-expected-width="50" data-expected-height="300"></div> |
| 145 <div class="sizedToGridArea" style="grid-column: c;" data-offset-x="0" data-
offset-y="0" data-expected-width="50" data-expected-height="50"></div> |
| 146 <div class="sizedToGridArea" style="grid-row: c;" data-offset-x="0" data-off
set-y="0" data-expected-width="50" data-expected-height="150"></div> |
| 147 </div> |
| 148 </div> |
| 149 |
| 150 <div style="position: relative"> |
| 151 <div class="grid gridAreas gridWithNamedLineBeforeGridArea"> |
| 152 <div class="sizedToGridArea" style="grid-column-start: d-start;" data-offset
-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></
div> |
| 153 <div class="sizedToGridArea" style="grid-row-start: d-start;" data-offset-x=
"0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div
> |
| 154 </div> |
| 155 </div> |
| 156 |
| 157 <div style="position: relative"> |
| 158 <div class="grid gridAreas gridWithNamedLineBeforeGridArea"> |
| 159 <div class="sizedToGridArea" style="grid-column: a;" data-offset-x="0" data-
offset-y="0" data-expected-width="350" data-expected-height="50"></div> |
| 160 <div class="sizedToGridArea" style="grid-row: d;" data-offset-x="0" data-off
set-y="50" data-expected-width="50" data-expected-height="300"></div> |
| 161 <div class="sizedToGridArea" style="grid-column: a; grid-row: d;" data-offse
t-x="0" data-offset-y="50" data-expected-width="350" data-expected-height="300">
</div> |
| 162 </div> |
| 163 </div> |
| 164 |
| 165 <!-- Check that a "-start" ident in a end column or a "-end" ident in a start co
lumn is not treated as a implicit grid line of a grid area --> |
| 166 <div style="position: relative"> |
| 167 <div class="grid gridAreas gridNoLineNames"> |
| 168 <div class="sizedToGridArea" style="grid-column: a / a-start; grid-row: d-st
art;" data-offset-x="50" data-offset-y="150" data-expected-width="100" data-expe
cted-height="200"></div> |
| 169 <div class="sizedToGridArea" style="grid-column: d / d-start; grid-row: c-st
art;" data-offset-x="150" data-offset-y="50" data-expected-width="200" data-expe
cted-height="100"></div> |
| 170 <div class="sizedToGridArea" style="grid-column: c; grid-row: a / a-start;"
data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-heigh
t="50"></div> |
| 171 <div class="sizedToGridArea" style="grid-column: d; grid-row: c / c-start;"
data-offset-x="150" data-offset-y="50" data-expected-width="200" data-expected-h
eight="100"></div> |
| 172 </div> |
| 173 </div> |
| 174 |
| 175 <!-- Check that we propertly resolve explicit "-end" lines inside grid areas --> |
| 176 <div style="position: relative"> |
| 177 <div class="grid gridAreas gridWithEndLines"> |
| 178 <div class="sizedToGridArea" style="grid-column: a" data-offset-x="50" data-
offset-y="0" data-expected-width="100" data-expected-height="50"></div> |
| 179 <div class="sizedToGridArea" style="grid-column: a; grid-row: c" data-offset
-x="50" data-offset-y="50" data-expected-width="100" data-expected-height="100">
</div> |
| 180 <div class="sizedToGridArea" style="grid-row: d;" data-offset-x="0" data-off
set-y="150" data-expected-width="50" data-expected-height="200"></div> |
| 181 <div class="sizedToGridArea" style="grid-column: a; grid-row: d;" data-offse
t-x="50" data-offset-y="150" data-expected-width="100" data-expected-height="200
"></div> |
| 182 </div> |
| 183 </div> |
| 184 |
| 185 <!-- Check that we always pick the first definition when multiple grid lines hav
e the same name --> |
| 186 <div style="position: relative"> |
| 187 <div class="grid gridAreas gridRepeatedNames"> |
| 188 <div class="sizedToGridArea" style="grid-column: d; grid-row: c" data-offset
-x="0" data-offset-y="50" data-expected-width="350" data-expected-height="100"><
/div> |
| 189 <div class="sizedToGridArea" style="grid-column: d-start / d-end; grid-row:
c-start / c-end" data-offset-x="0" data-offset-y="50" data-expected-width="350"
data-expected-height="100"></div> |
| 190 <div class="sizedToGridArea" style="grid-column: c; grid-row: d" data-offset
-x="0" data-offset-y="150" data-expected-width="50" data-expected-height="200"><
/div> |
| 191 </div> |
| 192 </div> |
| 193 |
| 194 </body> |
| 195 </html> |
OLD | NEW |