blob: 482c936cdaf8f68f1054fa3050e144b4c2584943 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel="stylesheet">
<link href="resources/grid.css" rel="stylesheet">
<script src="../../resources/check-layout.js"></script>
<style>
body {
margin: 0;
}
.grid {
grid-template-columns: 100px 100px;
grid-template-rows: 200px 200px;
margin-bottom: 20px;
position: relative;
font: 15px/1 Ahem;
}
.margins {
margin: 4px 8px 12px 16px;
}
.paddings {
padding: 4px 6px 8px 10px;
}
.borders {
border-width: 5px 10px 15px 20px;
border-style: dotted;
}
</style>
</head>
<body onload="checkLayout('.grid')">
<p>This test checks that the 'stretch' value is applied correctly for 'align' and 'justify' properties.</p>
<div style="position: relative">
<p>direction: LTR | margin: 4px 8px 12px 16px</p>
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
<div class="margins firstRowFirstColumn" data-offset-x="16" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins secondRowSecondColumn" data-offset-x="116" data-offset-y="204" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | border: 5px 10px 15px 20px</p>
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
<div class="borders firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="70" data-expected-client-height="180">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="borders secondRowSecondColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="70" data-expected-client-height="180"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | padding: 4px 6px 8px 10px</p>
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
<div class="paddings firstRowFirstColumn" data-total-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="paddings secondRowSecondColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | margin: 4px 8px 12px 16px | border: 5px 10px 15px 20px</p>
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
<div class="margins borders firstRowFirstColumn" data-offset-x="16" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="46" data-expected-client-height="164">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins borders secondRowSecondColumn" data-offset-x="116" data-offset-y="204" data-expected-width="76" data-expected-height="184" data-expected-client-width="46" data-expected-client-height="164"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | margin: 4px 8px 12px 16px | padding: 4px 6px 8px 10px</p>
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
<div class="margins paddings firstRowFirstColumn" data-offset-x="16" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins paddings secondRowSecondColumn" data-offset-x="116" data-offset-y="204" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184"></div>
</div>
</div>
<div style="position: relative">
<p>direction: LTR | margin: 4px 8px 12px 16px | border: 5px 10px 15px 20px | padding: 4px 6px 8px 10px</p>
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
<div class="margins borders paddings firstRowFirstColumn" data-offset-x="16" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="46" data-expected-client-height="164">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins borders paddings secondRowSecondColumn" data-offset-x="116" data-offset-y="204" data-expected-width="76" data-expected-height="184"></div>
</div>
</div>
<!-- rtl direction -->
<div style="position: relative">
<p>direction: RTL | margin: 4px 8px 12px 16px</p>
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
<div class="margins firstRowFirstColumn" data-offset-x="116" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins secondRowSecondColumn" data-offset-x="16" data-offset-y="204" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | border: 5px 10px 15px 20px</p>
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
<div class="borders firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="70" data-expected-client-height="180">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="borders secondRowSecondColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="70" data-expected-client-height="180"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | padding: 4px 6px 8px 10px</p>
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
<div class="paddings firstRowFirstColumn" data-total-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="paddings secondRowSecondColumn" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | margin: 4px 8px 12px 16px | border: 5px 10px 15px 20px</p>
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
<div class="margins borders firstRowFirstColumn" data-offset-x="116" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="46" data-expected-client-height="164">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins borders secondRowSecondColumn" data-offset-x="16" data-offset-y="204" data-expected-width="76" data-expected-height="184" data-expected-client-width="46" data-expected-client-height="164"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | margin: 4px 8px 12px 16px | padding: 4px 6px 8px 10px</p>
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
<div class="margins paddings firstRowFirstColumn" data-offset-x="116" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins paddings secondRowSecondColumn" data-offset-x="16" data-offset-y="204" data-expected-width="76" data-expected-height="184" data-expected-client-width="76" data-expected-client-height="184"></div>
</div>
</div>
<div style="position: relative">
<p>direction: RTL | margin: 4px 8px 12px 16px | border: 5px 10px 15px 20px | padding: 4px 6px 8px 10px</p>
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
<div class="margins borders paddings firstRowFirstColumn" data-offset-x="116" data-offset-y="4" data-expected-width="76" data-expected-height="184" data-expected-client-width="46" data-expected-client-height="164">X X X X X X X X X X</div>
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="200" data-expected-width="100" data-expected-height="200" data-expected-client-width="100" data-expected-client-height="200"></div>
<div class="margins borders paddings secondRowSecondColumn" data-offset-x="16" data-offset-y="204" data-expected-width="76" data-expected-height="184"></div>
</div>
</div>
</body>
</html>