blob: 4e77a216b22fe989ae2fe7b6fc744ade767e8de6 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link href="resources/grid.css" rel="stylesheet">
<link href="resources/grid-alignment.css" rel="stylesheet">
<script src="../../resources/check-layout.js"></script>
<style>
body {
margin: 0;
}
.grid {
grid: 100px 100px / 50px 50px;
position: relative;
width: 300px;
height: 200px;
}
.cell {
width: 20px;
height: 40px;
}
</style>
</head>
<body onload="checkLayout('.grid')">
<p>This test checks that the justify-content property is applied correctly in vertical-LR grids.</p>
<div style="position: relative">
<p>direction: LTR | justify-content: 'center'</p>
<div class="grid verticalLR justifyContentCenter" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | justify-content: 'left'</p>
<div class="grid verticalLR justifyContentLeft" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | justify-content: 'right'</p>
<div class="grid verticalLR justifyContentRight" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="150" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | justify-content: 'start'</p>
<div class="grid verticalLR justifyContentStart" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | justify-content: 'end'</p>
<div class="grid verticalLR justifyContentEnd" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="150" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<!-- RTL direction. -->
<div style="position: relative">
<p>direction: RTL | justify-content: 'center'</p>
<div class="grid verticalLR directionRTL justifyContentCenter" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="60" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | justify-content: 'left'</p>
<div class="grid verticalLR directionRTL justifyContentLeft" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="60" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="10" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | justify-content: 'right'</p>
<div class="grid verticalLR directionRTL justifyContentRight" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | justify-content: 'start'</p>
<div class="grid verticalLR directionRTL justifyContentStart" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | justify-content: 'end'</p>
<div class="grid verticalLR directionRTL justifyContentEnd" data-expected-width="300" data-expected-height="200">
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="60" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="10" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
</body>
</html>