blob: 22a0a4410e7d7af2a7b5c0447710eee467496c94 [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: 200px;
height: 300px;
}
.cell {
width: 20px;
height: 40px;
}
</style>
</head>
<body onload="checkLayout('.grid')">
<p>This test checks that the justify-content property is applied correctly when using content-position values.</p>
<div style="position: relative">
<p>direction: LTR | justify-content: 'center'</p>
<div class="grid justifyContentCenter" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="50" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="100" data-expected-width="50" data-expected-height="100"></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 justifyContentLeft" data-expected-width="200" data-expected-height="300">
<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="50" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="50" data-offset-y="100" 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 justifyContentRight" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="150" data-offset-y="100" 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 justifyContentStart" data-expected-width="200" data-expected-height="300">
<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="50" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="50" data-offset-y="100" 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 justifyContentEnd" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="150" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | justify-content: 'flex-start'</p>
<div class="grid justifyContentFlexStart" data-expected-width="200" data-expected-height="300">
<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="50" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="50" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | justify-content: 'flex-end'</p>
<div class="grid justifyContentFlexEnd" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="150" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
<!-- Default alignment and initial values. -->
<div style="position: relative">
<p>direction: LTR | justify-content: 'auto' (resolved to 'start')</p>
<div class="grid" data-expected-width="200" data-expected-height="300">
<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="50" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="50" data-offset-y="100" 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 directionRTL justifyContentCenter" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="130" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="80" data-offset-y="100" 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 directionRTL justifyContentLeft" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="80" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="30" data-offset-y="100" 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 directionRTL justifyContentRight" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="130" data-offset-y="100" 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 directionRTL justifyContentStart" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="130" data-offset-y="100" 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 directionRTL justifyContentEnd" data-expected-width="200" data-expected-height="300">
<div class="cell firstRowFirstColumn" data-offset-x="80" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
<div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="100" data-expected-width="50" data-expected-height="100"></div>
<div class="cell secondRowSecondColumn" data-offset-x="30" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
</div>
</div>
</body>
</html>