OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <link href="resources/grid.css" rel="stylesheet"> |
| 4 <style> |
| 5 .grid { |
| 6 grid-definition-columns: 100px 100px; |
| 7 grid-definition-rows: 200px 200px; |
| 8 width: -webkit-fit-content; |
| 9 } |
| 10 |
| 11 .cell { |
| 12 width: 10px; |
| 13 height: 20px; |
| 14 } |
| 15 |
| 16 .justifySelfStretch { |
| 17 justify-self: stretch; |
| 18 } |
| 19 |
| 20 .justifySelfStart { |
| 21 justify-self: start; |
| 22 } |
| 23 |
| 24 .justifySelfEnd { |
| 25 justify-self: end; |
| 26 } |
| 27 |
| 28 .justifySelfCenter { |
| 29 justify-self: center; |
| 30 } |
| 31 |
| 32 .justifySelfRight { |
| 33 justify-self: right; |
| 34 } |
| 35 |
| 36 .justifySelfLeft { |
| 37 justify-self: left; |
| 38 } |
| 39 |
| 40 .justifySelfFlexStart { |
| 41 justify-self: flex-start; |
| 42 } |
| 43 |
| 44 .justifySelfFlexEnd { |
| 45 justify-self: flex-end; |
| 46 } |
| 47 |
| 48 .justifySelfSelfStart { |
| 49 justify-self: self-start; |
| 50 } |
| 51 |
| 52 .justifySelfSelfEnd { |
| 53 justify-self: self-end; |
| 54 } |
| 55 </style> |
| 56 <script src="../../resources/check-layout.js"></script> |
| 57 <body onload="checkLayout('.grid')"> |
| 58 |
| 59 <p>This test checks that the justify-self property is applied correctly.</p> |
| 60 |
| 61 <div style="position: relative" class="constrainedContainer"> |
| 62 <div class="grid" data-expected-width="200" data-expected-height="400"> |
| 63 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="0" data-o
ffset-y="0" data-expected-width="100" data-expected-height="0"></div> |
| 64 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="100"
data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 65 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="190" da
ta-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 66 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="45"
data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 67 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="190"
data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 68 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="100"
data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 69 </div> |
| 70 |
| 71 <div style="position: relative" class="constrainedContainer"> |
| 72 <div class="grid" data-expected-width="200" data-expected-height="400"> |
| 73 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="0" d
ata-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 74 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="1
00" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 75 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="0
" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 76 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="19
0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 77 </div> |
| 78 </div> |
| 79 |
| 80 <!-- Vertical writing mode. --> |
| 81 <div style="position: relative" class="constrainedContainer"> |
| 82 <div class="grid verticalRL" data-expected-width="400" data-expected-height="200
"> |
| 83 <!-- FIXME: Why is offset-x 400? --> |
| 84 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="400" data
-offset-y="0" data-expected-width="0" data-expected-height="100"></div> |
| 85 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="390"
data-offset-y="100" data-expected-width="10" data-expected-height="20"></div> |
| 86 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="390" da
ta-offset-y="180" data-expected-width="10" data-expected-height="20"></div> |
| 87 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="190"
data-offset-y="40" data-expected-width="10" data-expected-height="20"></div> |
| 88 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="190"
data-offset-y="100" data-expected-width="10" data-expected-height="20"></div> |
| 89 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="190"
data-offset-y="100" data-expected-width="10" data-expected-height="20"></div> |
| 90 </div> |
| 91 |
| 92 <div style="position: relative" class="constrainedContainer"> |
| 93 <div class="grid verticalLR" data-expected-width="400" data-expected-height="200
"> |
| 94 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="0" d
ata-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 95 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="0
" data-offset-y="100" data-expected-width="10" data-expected-height="20"></div> |
| 96 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="2
00" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 97 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="20
0" data-offset-y="180" data-expected-width="10" data-expected-height="20"></div> |
| 98 </div> |
| 99 </div> |
| 100 |
| 101 <!-- RTL direction. --> |
| 102 <div style="position: relative" class="constrainedContainer"> |
| 103 <div class="grid directionRTL" data-expected-width="200" data-expected-height="4
00"> |
| 104 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="0" data-o
ffset-y="0" data-expected-width="100" data-expected-height="0"></div> |
| 105 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="190"
data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 106 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="100" da
ta-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 107 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="45"
data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 108 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="190"
data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 109 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="100"
data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 110 </div> |
| 111 |
| 112 <div style="position: relative" class="constrainedContainer"> |
| 113 <div class="grid directionRTL" data-expected-width="200" data-expected-height="4
00"> |
| 114 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="90"
data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 115 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="1
90" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> |
| 116 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="9
0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 117 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="10
0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> |
| 118 </div> |
| 119 </div> |
| 120 |
| 121 <!-- RTL direction with opposite directions grid container vs grid item. --> |
| 122 <div style="position: relative" class="constrainedContainer"> |
| 123 <div class="grid" data-expected-width="200" data-expected-height="400"> |
| 124 <div class="justifySelfStretch firstRowFirstColumn directionRTL" data-offset
-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="0"></di
v> |
| 125 <div class="cell justifySelfStart firstRowSecondColumn directionRTL" data-of
fset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height="20
"></div> |
| 126 <div class="cell justifySelfEnd firstRowSecondColumn directionRTL" data-offs
et-x="190" data-offset-y="0" data-expected-width="10" data-expected-height="20">
</div> |
| 127 <div class="cell justifySelfCenter secondRowFirstColumn directionRTL" data-o
ffset-x="45" data-offset-y="200" data-expected-width="10" data-expected-height="
20"></div> |
| 128 <div class="cell justifySelfRight secondRowSecondColumn directionRTL" data-o
ffset-x="190" data-offset-y="200" data-expected-width="10" data-expected-height=
"20"></div> |
| 129 <div class="cell justifySelfLeft secondRowSecondColumn directionRTL" data-of
fset-x="100" data-offset-y="200" data-expected-width="10" data-expected-height="
20"></div> |
| 130 </div> |
| 131 |
| 132 <div style="position: relative" class="constrainedContainer"> |
| 133 <div class="grid" data-expected-width="200" data-expected-height="400"> |
| 134 <div class="cell justifySelfFlexEnd firstRowFirstColumn directionRTL" data-o
ffset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="20"
></div> |
| 135 <div class="cell justifySelfFlexStart firstRowSecondColumn directionRTL" dat
a-offset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height
="20"></div> |
| 136 <div class="cell justifySelfSelfStart secondRowFirstColumn directionRTL" dat
a-offset-x="90" data-offset-y="200" data-expected-width="10" data-expected-heigh
t="20"></div> |
| 137 <div class="cell justifySelfSelfEnd secondRowSecondColumn directionRTL" data
-offset-x="100" data-offset-y="200" data-expected-width="10" data-expected-heigh
t="20"></div> |
| 138 </div> |
| 139 </div> |
| 140 |
| 141 </body> |
| 142 </html> |
OLD | NEW |