OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <link href="resources/grid.css" rel="stylesheet"> |
| 3 <link href="resources/grid-alignment.css" rel="stylesheet"> |
| 4 <link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel
=stylesheet> |
| 5 <style> |
| 6 body { |
| 7 margin: 0; |
| 8 } |
| 9 |
| 10 .container { |
| 11 position: relative; |
| 12 } |
| 13 |
| 14 .grid { |
| 15 font: 10px/1 Ahem; |
| 16 position: relative; |
| 17 } |
| 18 |
| 19 .oneMinContentColTwoMinContentRows { |
| 20 font: 50px/1 Ahem; |
| 21 grid: min-content min-content / min-content; |
| 22 } |
| 23 |
| 24 .fixedSize { |
| 25 width: 300px; |
| 26 height: 200px; |
| 27 } |
| 28 |
| 29 .grid > :nth-child(1) { background-color: blue; } |
| 30 .grid > :nth-child(2) { background-color: magenta; } |
| 31 .grid > :nth-child(3) { background-color: orange; } |
| 32 </style> |
| 33 <script src="../../resources/testharness.js"></script> |
| 34 <script src="../../resources/testharnessreport.js"></script> |
| 35 <script src="../../resources/check-layout-th.js"></script> |
| 36 <body onload="checkLayout('.grid')"> |
| 37 <div id="log"></div> |
| 38 <p>This test checks that grid sizing works as expected with orthogonal flows and
items spanning more than 1 columns or rows. These cases require an extra track-
sizing algorithm cycle on the rows to determine final dimensions of the grid.</p
> |
| 39 |
| 40 <div class="container"> |
| 41 <p>Grid: <b>auto</b> | align: <b>start</b> | fixed-sized: <b>300 x 200</b> |
font: <b>10px</b> | Blue(LR) - row: 1 col: 1 | Magenta - row: 1 col: 3 | Orange
(LR) - row: 2 col: 2</p> |
| 42 <div class="grid fixedSize itemsStart"> |
| 43 <div class="verticalLR" style="grid-row: 1; grid-column: 1" dat
a-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-hei
ght="105">XX XXX X XXX XX</div> |
| 44 <div class="" style="grid-row: 1; grid-column: 3" dat
a-offset-x="180" data-offset-y="0" data-expected-width="120" data-expected-hei
ght="60">XXXX XX X XX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX X XXX XX XX</div
> |
| 45 <div class="verticalLR" style="grid-row: 2; grid-column: 2" dat
a-offset-x="20" data-offset-y="105" data-expected-width="200" data-expected-he
ight="95">XXX X XXX XXX XXX XX X XXXXX XXX XX X XXXXX XX X XX XX X XXX XXX XXX X
X X XXXX XXX XXX XXX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX XXX XXX XX X XXX
XX X XXX XX XX</div> |
| 46 </div> |
| 47 </div> |
| 48 |
| 49 <div class="container"> |
| 50 <p>Grid: <b>auto</b> | align: <b>start</b> | fixed-sized: <b>300 x 200</b> |
font: <b>10px</b> | Blue(LR) - <b>row: 1 / 3</b> col: 1 | Magenta - row: 1 col:
3 | Orange(LR) - row: 2 <b>col: 2 / 4</b></p> |
| 51 <div class="grid fixedSize itemsStart"> |
| 52 <div class="verticalLR" style="grid-row: 1 / 3; grid-column: 1" dat
a-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-hei
ght="150">XX XXX X XXX XX</div> |
| 53 <div class="" style="grid-row: 1; grid-column: 3" dat
a-offset-x="35" data-offset-y="0" data-expected-width="265" data-expected-hei
ght="30">XXXX XX X XX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX X XXX XX XX</div
> |
| 54 <div class="verticalLR" style="grid-row: 2; grid-column: 2 / 4;" dat
a-offset-x="10" data-offset-y="30" data-expected-width="100" data-expected-hei
ght="170">XXX X XXX XXX XXX XX X XXXXX XXX XX X XXXXX XX X XX XX X XXX XXX XXX X
X X XXXX XXX XXX XXX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX XXX XXX XX X XXX
XX X XXX XX XX</div> |
| 55 </div> |
| 56 </div> |
| 57 |
| 58 <div class="container"> |
| 59 <p>Grid: <b>auto</b> | align: <b>start</b> | fixed-sized: <b>300 x 200</b> |
font: <b>10px</b> | Blue(LR) - <b>row: 1 / 3</b> col: 1 | Magenta - <b>row: 1 /
3</b> col: 3 | Orange(LR) - <b>row: 3 col: 2 / 3</b></p> |
| 60 <div class="grid fixedSize itemsStart" data-expected-width="300" data-expect
ed-height="200"> |
| 61 <div class="verticalLR" style="grid-row: 1 / 3; grid-column: 1" dat
a-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-hei
ght="130">XX XXX X XXX XX</div> |
| 62 <div class="" style="grid-row: 1 / 3; grid-column: 3" dat
a-offset-x="220" data-offset-y="0" data-expected-width="80" data-expected-hei
ght="90">XXXX XX X XX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX X XXX XX XX</div
> |
| 63 <div class="verticalLR" style="grid-row: 3; grid-column: 2 / 3;" dat
a-offset-x="20" data-offset-y="130" data-expected-width="250" data-expected-hei
ght="70">XXX X XXX XXX XXX XX X XXXXX XXX XX X XXXXX XX X XX XX X XXX XXX XXX XX
X XXXX XXX XXX XXX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX XXX XXX XX X XXX
XX X XXX XX XX</div> |
| 64 </div> |
| 65 </div> |
| 66 |
| 67 <div class="container"> |
| 68 <p>Grid: <b>auto</b> | align: <b>start</b> | fixed-sized: <b>300 x 200</b> |
font: <b>10px</b> | Blue(LR) - <b>row: 1 / 3</b> col: 1 | Magenta - row: 1 col:
3 | Orange(LR) - row: 2 <b>col: 2 / 3</b></p> |
| 69 <div class="grid fixedSize itemsStart"> |
| 70 <div class="verticalLR" style="grid-row: 1 / 3; grid-column: 1" dat
a-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-hei
ght="150">XX XXX X XXX XX</div> |
| 71 <div class="" style="grid-row: 1; grid-column: 3" dat
a-offset-x="110" data-offset-y="0" data-expected-width="190" data-expected-hei
ght="40">XXXX XX X XX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX X XXX XX XX</div
> |
| 72 <div class="verticalLR" style="grid-row: 2; grid-column: 2 / 3;" dat
a-offset-x="10" data-offset-y="40" data-expected-width="110" data-expected-hei
ght="160">XXX X XXX XXX XXX XX X XXXXX XXX XX X XXXXX XX X XX XX X XXX XXX XXX X
X X XXXX XXX XXX XXX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX XXX XXX XX X XXX
XX X XXX XX XX</div> |
| 73 </div> |
| 74 </div> |
| 75 |
| 76 <div class="container"> |
| 77 <p>Grid: <b>auto</b> | align: <b>start</b> | fixed-sized: <b>300 x 200</b> |
font: <b>10px</b> | Blue(LR) - <b>row: 1 / 3</b> col: 1 | Magenta - row: 1 col:
3 | Orange(LR) - <b>row: 2 / 4 col: 2 / 3</b></p> |
| 78 <div class="grid fixedSize itemsStart"> |
| 79 <div class="verticalLR" style="grid-row: 1 / 3; grid-column: 1" dat
a-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-hei
ght="115">XX XXX X XXX XX</div> |
| 80 <div class="" style="grid-row: 1; grid-column: 2" dat
a-offset-x="20" data-offset-y="0" data-expected-width="280" data-expected-hei
ght="30">XXXX XX X XX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX X XXX XX XX</div
> |
| 81 <div class="verticalLR" style="grid-row: 2 / 4; grid-column: 2 / 3;" dat
a-offset-x="20" data-offset-y="30" data-expected-width="100" data-expected-hei
ght="170">XXX X XXX XXX XXX XX X XXXXX XXX XX X XXXXX XX X XX XX X XXX XXX XXX X
X X XXXX XXX XXX XXX XX X XXX XX XXXXX XXX XXX XX X XXX XX XXX XXX XXX XX X XXX
XX X XXX XX XX</div> |
| 82 </div> |
| 83 </div> |
| 84 |
| 85 <p>Grid: <b>min-content</b> / <b>min-content min-content</b> | align: <b>stretch
</b> | content-sized: <b>fit-content x auto</b> | font: <b>50px</b> | Blue(LR) -
<b>row: 1 / 3</b> col: 1 - <b>XX X X</b> | Magenta - row: 1 col: 1 - <b>X X</b>
</p> |
| 86 <div class="grid itemsStart oneMinContentColTwoMinContentRows fit-content" data-
expected-width="50" data-expected-height="100"> |
| 87 <div class="verticalLR" style="grid-row: 1 / 3; grid-column: 1" data-exp
ected-width="150" data-expected-height="100">XX X X</div> |
| 88 <div class="" style="grid-row: 1; grid-column: 1" data-exp
ected-width="150" data-expected-height="50">X X</div> |
| 89 </div> |
| 90 |
| 91 </body> |
OLD | NEW |