| 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 that aling-self and justify-self properties are not applied
when there is auto-margin in the correponding axis. Instead, auto-margin alignme
nt should be applied.</p> | 33 <p>This test checks that aling-self and justify-self properties are not applied
when there is auto-margin in the correponding axis. Instead, auto-margin alignme
nt 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 itemsCenter"> | 37 <div class="grid fit-content itemsCenter"> |
| 42 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="40" d
ata-offset-y="160" data-expected-width="20" data-expected-height="40"></div> | 38 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="40" d
ata-offset-y="160" data-expected-width="20" data-expected-height="40"></div> |
| 43 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="10
0" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div> | 39 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="10
0" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div> |
| 44 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="80"
data-offset-y="280" data-expected-width="20" data-expected-height="40"></div> | 40 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="80"
data-offset-y="280" data-expected-width="20" data-expected-height="40"></div> |
| 45 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
140" data-offset-y="200" data-expected-width="20" data-expected-height="40"></di
v> | 41 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
140" data-offset-y="200" data-expected-width="20" data-expected-height="40"></di
v> |
| 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"> | 47 <div class="grid fit-content"> |
| 52 <div class="item autoMargin firstRowFirstColumn" data-offset-x="40" data
-offset-y="80" data-expected-width="20" data-expected-height="40"></div> | 48 <div class="item autoMargin firstRowFirstColumn" data-offset-x="40" data
-offset-y="80" data-expected-width="20" data-expected-height="40"></div> |
| 53 <div class="item autoMargin firstRowSecondColumn" data-offset-x="140" da
ta-offset-y="80" data-expected-width="20" data-expected-height="40"></div> | 49 <div class="item autoMargin firstRowSecondColumn" data-offset-x="140" da
ta-offset-y="80" data-expected-width="20" data-expected-height="40"></div> |
| 54 <div class="item autoMargin secondRowFirstColumn" data-offset-x="40" dat
a-offset-y="280" data-expected-width="20" data-expected-height="40"></div> | 50 <div class="item autoMargin secondRowFirstColumn" data-offset-x="40" dat
a-offset-y="280" data-expected-width="20" data-expected-height="40"></div> |
| 55 <div class="item autoMargin secondRowSecondColumn" data-offset-x="140" d
ata-offset-y="280" data-expected-width="20" data-expected-height="40"></div> | 51 <div class="item autoMargin secondRowSecondColumn" data-offset-x="140" d
ata-offset-y="280" 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 itemsCenter"> | 57 <div class="grid fit-content itemsCenter"> |
| 62 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="40" data-o
ffset-y="160" data-expected-width="20" data-expected-height="40"><div class="ite
m"></div></div> | 58 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="40" data-o
ffset-y="160" data-expected-width="20" data-expected-height="40"><div class="ite
m"></div></div> |
| 63 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="100" da
ta-offset-y="80" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> | 59 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="100" da
ta-offset-y="80" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> |
| 64 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="80" data
-offset-y="280" data-expected-width="20" data-expected-height="40"><div class="i
tem"></div></div> | 60 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="80" data
-offset-y="280" data-expected-width="20" data-expected-height="40"><div class="i
tem"></div></div> |
| 65 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="140"
data-offset-y="200" data-expected-width="20" data-expected-height="40"><div clas
s="item"></div></div> | 61 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="140"
data-offset-y="200" data-expected-width="20" data-expected-height="40"><div clas
s="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"> | 67 <div class="grid fit-content"> |
| 72 <div class="autoMargin firstRowFirstColumn" data-offset-x="40" data-offs
et-y="80" data-expected-width="20" data-expected-height="40"><div class="item"><
/div></div> | 68 <div class="autoMargin firstRowFirstColumn" data-offset-x="40" data-offs
et-y="80" data-expected-width="20" data-expected-height="40"><div class="item"><
/div></div> |
| 73 <div class="autoMargin firstRowSecondColumn" data-offset-x="140" data-of
fset-y="80" data-expected-width="20" data-expected-height="40"><div class="item"
></div></div> | 69 <div class="autoMargin firstRowSecondColumn" data-offset-x="140" data-of
fset-y="80" data-expected-width="20" data-expected-height="40"><div class="item"
></div></div> |
| 74 <div class="autoMargin secondRowFirstColumn" data-offset-x="40" data-off
set-y="280" data-expected-width="20" data-expected-height="40"><div class="item"
></div></div> | 70 <div class="autoMargin secondRowFirstColumn" data-offset-x="40" data-off
set-y="280" data-expected-width="20" data-expected-height="40"><div class="item"
></div></div> |
| 75 <div class="autoMargin secondRowSecondColumn" data-offset-x="140" data-o
ffset-y="280" data-expected-width="20" data-expected-height="40"><div class="ite
m"></div></div> | 71 <div class="autoMargin secondRowSecondColumn" data-offset-x="140" data-o
ffset-y="280" data-expected-width="20" data-expected-height="40"><div class="ite
m"></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 itemsCenter directionRTL"> | 78 <div class="grid fit-content itemsCenter directionRTL"> |
| 83 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="140"
data-offset-y="160" data-expected-width="20" data-expected-height="40"></div> | 79 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="140"
data-offset-y="160" data-expected-width="20" data-expected-height="40"></div> |
| 84 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="0"
data-offset-y="80" data-expected-width="20" data-expected-height="40"></div> | 80 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="0"
data-offset-y="80" data-expected-width="20" data-expected-height="40"></div> |
| 85 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div> | 81 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="180
" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div> |
| 86 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
40" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div
> | 82 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x="
40" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div
> |
| 87 </div> | 83 </div> |
| 88 </div> | 84 </div> |
| 89 | 85 |
| 90 <p>Direction: RTL | Self Alignment: stretch | fixed size items | 4 auto-margin</
p> | 86 <p>Direction: RTL | Self Alignment: stretch | fixed size items | 4 auto-margin</
p> |
| 91 <div style="position: relative"> | 87 <div style="position: relative"> |
| 92 <div class="grid directionRTL"> | 88 <div class="grid fit-content directionRTL"> |
| 93 <div class="item autoMargin firstRowFirstColumn" data-offset-x="140" dat
a-offset-y="80" data-expected-width="20" data-expected-height="40"></div> | 89 <div class="item autoMargin firstRowFirstColumn" data-offset-x="140" dat
a-offset-y="80" data-expected-width="20" data-expected-height="40"></div> |
| 94 <div class="item autoMargin firstRowSecondColumn" data-offset-x="40" dat
a-offset-y="80" data-expected-width="20" data-expected-height="40"></div> | 90 <div class="item autoMargin firstRowSecondColumn" data-offset-x="40" dat
a-offset-y="80" data-expected-width="20" data-expected-height="40"></div> |
| 95 <div class="item autoMargin secondRowFirstColumn" data-offset-x="140" da
ta-offset-y="280" data-expected-width="20" data-expected-height="40"></div> | 91 <div class="item autoMargin secondRowFirstColumn" data-offset-x="140" da
ta-offset-y="280" data-expected-width="20" data-expected-height="40"></div> |
| 96 <div class="item autoMargin secondRowSecondColumn" data-offset-x="40" da
ta-offset-y="280" data-expected-width="20" data-expected-height="40"></div> | 92 <div class="item autoMargin secondRowSecondColumn" data-offset-x="40" da
ta-offset-y="280" data-expected-width="20" data-expected-height="40"></div> |
| 97 </div> | 93 </div> |
| 98 </div> | 94 </div> |
| 99 | 95 |
| 100 <p>Direction: RTL | Self Alignment: center | auto size items | 1 auto-margin</p> | 96 <p>Direction: RTL | Self Alignment: center | auto size items | 1 auto-margin</p> |
| 101 <div style="position: relative"> | 97 <div style="position: relative"> |
| 102 <div class="grid itemsCenter directionRTL"> | 98 <div class="grid fit-content itemsCenter directionRTL"> |
| 103 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="140" data-
offset-y="160" data-expected-width="20" data-expected-height="40"><div class="it
em"></div></div> | 99 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="140" data-
offset-y="160" data-expected-width="20" data-expected-height="40"><div class="it
em"></div></div> |
| 104 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="0" data
-offset-y="80" data-expected-width="20" data-expected-height="40"><div class="it
em"></div></div> | 100 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="0" data
-offset-y="80" data-expected-width="20" data-expected-height="40"><div class="it
em"></div></div> |
| 105 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="180" dat
a-offset-y="280" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> | 101 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="180" dat
a-offset-y="280" data-expected-width="20" data-expected-height="40"><div class="
item"></div></div> |
| 106 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="40" d
ata-offset-y="200" data-expected-width="20" data-expected-height="40"><div class
="item"></div></div> | 102 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="40" d
ata-offset-y="200" data-expected-width="20" data-expected-height="40"><div class
="item"></div></div> |
| 107 </div> | 103 </div> |
| 108 </div> | 104 </div> |
| 109 | 105 |
| 110 <p>Direction: RTL | Self Alignment: stretch | auto size items | 4 auto-margin</p
> | 106 <p>Direction: RTL | Self Alignment: stretch | auto size items | 4 auto-margin</p
> |
| 111 <div style="position: relative"> | 107 <div style="position: relative"> |
| 112 <div class="grid directionRTL"> | 108 <div class="grid fit-content directionRTL"> |
| 113 <div class="autoMargin firstRowFirstColumn" data-offset-x="140" data-off
set-y="80" data-expected-width="20" data-expected-height="40"><div class="item">
</div></div> | 109 <div class="autoMargin firstRowFirstColumn" data-offset-x="140" data-off
set-y="80" data-expected-width="20" data-expected-height="40"><div class="item">
</div></div> |
| 114 <div class="autoMargin firstRowSecondColumn" data-offset-x="40" data-off
set-y="80" data-expected-width="20" data-expected-height="40"><div class="item">
</div></div> | 110 <div class="autoMargin firstRowSecondColumn" data-offset-x="40" data-off
set-y="80" data-expected-width="20" data-expected-height="40"><div class="item">
</div></div> |
| 115 <div class="autoMargin secondRowFirstColumn" data-offset-x="140" data-of
fset-y="280" data-expected-width="20" data-expected-height="40"><div class="item
"></div></div> | 111 <div class="autoMargin secondRowFirstColumn" data-offset-x="140" data-of
fset-y="280" data-expected-width="20" data-expected-height="40"><div class="item
"></div></div> |
| 116 <div class="autoMargin secondRowSecondColumn" data-offset-x="40" data-of
fset-y="280" data-expected-width="20" data-expected-height="40"><div class="item
"></div></div> | 112 <div class="autoMargin secondRowSecondColumn" data-offset-x="40" data-of
fset-y="280" data-expected-width="20" data-expected-height="40"><div class="item
"></div></div> |
| 117 </div> | 113 </div> |
| 118 </div> | 114 </div> |
| 119 | 115 |
| 120 </body> | 116 </body> |
| 121 </html> | 117 </html> |
| OLD | NEW |