blob: c8a10c6b117cb13276a22ed3156ba8ca3b8ee3f5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
grid-template-columns: 50px 60px;
grid-template-rows: 20px 30px;
max-width: 110px;
}
.firstRowFirstColumn {
width: 10px;
height: 15px;
}
.firstRowSecondColumn {
width: 10px;
height: 15px;
}
.secondRowFirstColumn {
width: 10px;
height: 15px;
}
.secondRowSecondColumn {
width: 10px;
height: 15px;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid')">
<p>Test some simple grid layouts by positioning grid items by index.</p>
<!-- FIXME: The offsets assumes that grid-{column|row}-align are set to 'start', not 'stretch' (the default). Fix
them once we properly implement stretching / alignment. -->
<div style="position: relative">
<div class="grid" data-expected-width="110" data-expected-height="50">
<div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div>
<div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="0"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="20"></div>
<div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="20"></div>
</div>
</div>
<div style="position: relative">
<div class="grid" style="-webkit-writing-mode: horizontal-bt" data-expected-width="110" data-expected-height="50">
<div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="35"></div>
<div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="35"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="15"></div>
<div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="15"></div>
</div>
</div>
<div style="position: relative">
<div class="grid verticalRL" style="margin-bottom: 60px;" data-expected-width="50" data-expected-height="110">
<div class="firstRowFirstColumn" data-offset-x="40" data-offset-y="0"></div>
<div class="firstRowSecondColumn" data-offset-x="40" data-offset-y="50"></div>
<div class="secondRowFirstColumn" data-offset-x="20" data-offset-y="0"></div>
<div class="secondRowSecondColumn" data-offset-x="20" data-offset-y="50"></div>
</div>
</div>
<div style="position: relative">
<div class="grid verticalLR" style="margin-bottom: 60px;" data-expected-width="50" data-expected-height="110">
<div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="50"></div>
<div class="secondRowFirstColumn" data-offset-x="20" data-offset-y="0"></div>
<div class="secondRowSecondColumn" data-offset-x="20" data-offset-y="50"></div>
</div>
</div>
</body>
</html>