| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel
="stylesheet"> |
| 4 <link href="resources/grid.css" rel="stylesheet"> | 5 <link href="resources/grid.css" rel="stylesheet"> |
| 6 <link href="resources/grid-alignment.css" rel="stylesheet"> |
| 5 <script src="../../resources/check-layout.js"></script> | 7 <script src="../../resources/check-layout.js"></script> |
| 6 <style> | 8 <style> |
| 7 body { | 9 body { |
| 8 margin: 0; | 10 margin: 0; |
| 9 } | 11 } |
| 10 | 12 |
| 11 .grid { | 13 .grid { |
| 12 grid-template-columns: 100px 100px; | 14 grid-template-columns: 100px 100px; |
| 13 grid-template-rows: 200px 200px; | 15 grid-template-rows: 200px 200px; |
| 14 width: -webkit-fit-content; | |
| 15 margin-bottom: 20px; | 16 margin-bottom: 20px; |
| 16 } | 17 } |
| 17 | 18 |
| 18 .item { | 19 .item { |
| 19 width: 20px; | 20 width: 20px; |
| 20 height: 40px; | 21 height: 40px; |
| 21 } | 22 } |
| 22 | 23 |
| 23 .autoMarginTop { margin-top: auto; } | 24 .autoMarginTop { margin-top: auto; } |
| 24 .autoMarginRight { margin-right: auto; } | 25 .autoMarginRight { margin-right: auto; } |
| 25 .autoMarginBottom { margin-bottom: auto; } | 26 .autoMarginBottom { margin-bottom: auto; } |
| 26 .autoMarginLeft { margin-left: auto; } | 27 .autoMarginLeft { margin-left: auto; } |
| 27 .autoMargin { margin: auto; } | 28 .autoMargin { margin: auto; } |
| 28 | |
| 29 .itemsCenter { | |
| 30 align-items: center; | |
| 31 justify-items: center; | |
| 32 } | |
| 33 </style> | 29 </style> |
| 34 </head> | 30 </head> |
| 35 <body onload="checkLayout('.grid')"> | 31 <body onload="checkLayout('.grid')"> |
| 36 | 32 |
| 37 <p>This test checks on a vertical-rl grid that aling-self and justify-self prope
rties are not applied when there is auto-margin in the correponding axis. Instea
d, auto-margin alignment should be applied.</p> | 33 <p>This test checks on a vertical-rl grid that aling-self and justify-self prope
rties are not applied when there is auto-margin in the correponding axis. Instea
d, auto-margin alignment should be applied.</p> |
| 38 | 34 |
| 39 <p>Direction: LTR | Self Alignment: center | fixed size items | 1 auto-margin</p
> | 35 <p>Direction: LTR | Self Alignment: center | fixed size items | 1 auto-margin</p
> |
| 40 <div style="position: relative"> | 36 <div style="position: relative"> |
| 41 <div class="grid verticalRL itemsCenter"> | 37 <div class="grid fit-content verticalRL itemsCenter"> |
| 42 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="60" data-expected-width="20" data-expected-height="40"></div> | 38 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="60" data-expected-width="20" data-expected-height="40"></div> |
| 43 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="130" data-expected-width="20" data-expected-height="40"></div> | 39 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="130" data-expected-width="20" data-expected-height="40"></div> |
| 44 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="30" data-expected-width="20" data-expected-height="40"></div> | 40 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="30" data-expected-width="20" data-expected-height="40"></div> |
| 45 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div
> | 41 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div
> |
| 46 </div> | 42 </div> |
| 47 </div> | 43 </div> |
| 48 | 44 |
| 49 <p>Direction: LTR | Self Alignment: stretch | fixed size items | 4 auto-margin</
p> | 45 <p>Direction: LTR | Self Alignment: stretch | fixed size items | 4 auto-margin</
p> |
| 50 <div style="position: relative"> | 46 <div style="position: relative"> |
| 51 <div class="grid verticalRL"> | 47 <div class="grid fit-content verticalRL"> |
| 52 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"></div> | 48 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"></div> |
| 53 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"></div> | 49 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"></div> |
| 54 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"></div> | 50 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"></div> |
| 55 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"></div> | 51 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"></div> |
| 56 </div> | 52 </div> |
| 57 </div> | 53 </div> |
| 58 | 54 |
| 59 <p>Direction: LTR | Self Alignment: center | auto size items | 1 auto-margin</p> | 55 <p>Direction: LTR | Self Alignment: center | auto size items | 1 auto-margin</p> |
| 60 <div style="position: relative"> | 56 <div style="position: relative"> |
| 61 <div class="grid verticalRL itemsCenter"> | 57 <div class="grid fit-content verticalRL itemsCenter"> |
| 62 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="60" data-expected-width="20" data-expected-height="40"><div class
="item"></div></div> | 58 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="60" data-expected-width="20" data-expected-height="40"><div class
="item"></div></div> |
| 63 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="130" data-expected-width="20" data-expected-height="40"><div c
lass="item"></div></div> | 59 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="130" data-expected-width="20" data-expected-height="40"><div c
lass="item"></div></div> |
| 64 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="30" data-expected-width="20" data-expected-height="40"><div cla
ss="item"></div></div> | 60 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="30" data-expected-width="20" data-expected-height="40"><div cla
ss="item"></div></div> |
| 65 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="100" data-expected-width="20" data-expected-height="40"><div
class="item"></div></div> | 61 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="100" data-expected-width="20" data-expected-height="40"><div
class="item"></div></div> |
| 66 </div> | 62 </div> |
| 67 </div> | 63 </div> |
| 68 | 64 |
| 69 <p>Direction: LTR | Self Alignment: stretch | auto size items | 4 auto-margin</p
> | 65 <p>Direction: LTR | Self Alignment: stretch | auto size items | 4 auto-margin</p
> |
| 70 <div style="position: relative"> | 66 <div style="position: relative"> |
| 71 <div class="grid verticalRL"> | 67 <div class="grid fit-content verticalRL"> |
| 72 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="i
tem"></div></div> | 68 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="i
tem"></div></div> |
| 73 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"><div class=
"item"></div></div> | 69 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"><div class=
"item"></div></div> |
| 74 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="i
tem"></div></div> | 70 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="i
tem"></div></div> |
| 75 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"><div class=
"item"></div></div> | 71 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="130" data-expected-width="20" data-expected-height="40"><div class=
"item"></div></div> |
| 76 </div> | 72 </div> |
| 77 </div> | 73 </div> |
| 78 | 74 |
| 79 <!-- direction RTL --> | 75 <!-- direction RTL --> |
| 80 <p>Direction: RTL | Self Alignment: center | fixed size items | 1 auto-margin</p
> | 76 <p>Direction: RTL | Self Alignment: center | fixed size items | 1 auto-margin</p
> |
| 81 <div style="position: relative"> | 77 <div style="position: relative"> |
| 82 <div class="grid verticalRL itemsCenter directionRTL" data-expected-width="4
00" data-expected-height="200"> | 78 <div class="grid fit-content verticalRL itemsCenter directionRTL" data-expec
ted-width="400" data-expected-height="200"> |
| 83 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="160" data-expected-width="20" data-expected-height="40"></div> | 79 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="160" data-expected-width="20" data-expected-height="40"></div> |
| 84 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="30" data-expected-width="20" data-expected-height="40"></div> | 80 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="30" data-expected-width="20" data-expected-height="40"></div> |
| 85 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="130" data-expected-width="20" data-expected-height="40"></div> | 81 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="130" data-expected-width="20" data-expected-height="40"></div> |
| 86 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div> | 82 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div> |
| 87 </div> | 83 </div> |
| 88 </div> | 84 </div> |
| 89 | 85 |
| 90 | 86 |
| 91 <p>Direction: RTL | Self Alignment: stretch | fixed size items | 4 auto-margin</
p> | 87 <p>Direction: RTL | Self Alignment: stretch | fixed size items | 4 auto-margin</
p> |
| 92 <div style="position: relative"> | 88 <div style="position: relative"> |
| 93 <div class="grid verticalRL directionRTL"> | 89 <div class="grid fit-content verticalRL directionRTL"> |
| 94 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"></div> | 90 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"></div> |
| 95 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"></div> | 91 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"></div> |
| 96 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"></div> | 92 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"></div> |
| 97 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"></div> | 93 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"></div> |
| 98 </div> | 94 </div> |
| 99 </div> | 95 </div> |
| 100 | 96 |
| 101 <p>Direction: RTL | Self Alignment: center | auto size items | 1 auto-margin</p> | 97 <p>Direction: RTL | Self Alignment: center | auto size items | 1 auto-margin</p> |
| 102 <div style="position: relative"> | 98 <div style="position: relative"> |
| 103 <div class="grid verticalRL itemsCenter directionRTL"> | 99 <div class="grid fit-content verticalRL itemsCenter directionRTL"> |
| 104 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="160" data-expected-width="20" data-expected-height="40"><div clas
s="item"></div></div> | 100 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="290"
data-offset-y="160" data-expected-width="20" data-expected-height="40"><div clas
s="item"></div></div> |
| 105 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="30" data-expected-width="20" data-expected-height="40"><div cl
ass="item"></div></div> | 101 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="20
0" data-offset-y="30" data-expected-width="20" data-expected-height="40"><div cl
ass="item"></div></div> |
| 106 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="130" data-expected-width="20" data-expected-height="40"><div cl
ass="item"></div></div> | 102 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="130" data-expected-width="20" data-expected-height="40"><div cl
ass="item"></div></div> |
| 107 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="0" data-expected-width="20" data-expected-height="40"><div cl
ass="item"></div></div> | 103 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
90" data-offset-y="0" data-expected-width="20" data-expected-height="40"><div cl
ass="item"></div></div> |
| 108 </div> | 104 </div> |
| 109 </div> | 105 </div> |
| 110 | 106 |
| 111 | 107 |
| 112 <p>Direction: RTL | Self Alignment: stretch | auto size items | 4 auto-margin</p
> | 108 <p>Direction: RTL | Self Alignment: stretch | auto size items | 4 auto-margin</p
> |
| 113 <div style="position: relative"> | 109 <div style="position: relative"> |
| 114 <div class="grid verticalRL directionRTL"> | 110 <div class="grid fit-content verticalRL directionRTL"> |
| 115 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> | 111 <div class="item autoMargin firstRowFirstColumn" data-offset-x="290" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> |
| 116 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> | 112 <div class="item autoMargin firstRowSecondColumn" data-offset-x="290" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> |
| 117 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> | 113 <div class="item autoMargin secondRowFirstColumn" data-offset-x="90" dat
a-offset-y="130" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> |
| 118 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> | 114 <div class="item autoMargin secondRowSecondColumn" data-offset-x="90" da
ta-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> |
| 119 </div> | 115 </div> |
| 120 </div> | 116 </div> |
| 121 | 117 |
| 122 </body> | 118 </body> |
| 123 </html> | 119 </html> |
| OLD | NEW |