blob: f9a0e25991ff55c71a97325364a682e7ca93d55a [file] [log] [blame]
<!DOCTYPE HTML>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
grid: 150px / 100px 100px;
position: relative;
}
#fromStretch { align-items: stretch; }
#toStretch { align-items: end; }
</style>
<script src="../../resources/check-layout.js"></script>
<p>Tests how a align-items style change requires a relayout of the grid and previously stretched items.</p>
<p>The grid bellow had initially 'align-items: end' and was changed to 'stretch'.</p>
<div id="toStretch" class="grid">
<div style="width: 50px;" class="firstRowFirstColumn" data-expected-height="150" data-offset-y="0">
<div style="height: 50px"></div>
</div>
<div style="width: 50px;" class="firstRowSecondColumn" data-expected-height="150" data-offset-y="0">
<div style="height: 100px"></div>
</div>
</div>
<p>The grid bellow was initially stretched and it has now 'align-items: center'.</p>
<div id="fromStretch" class="grid">
<div style="width: 50px;" class="firstRowFirstColumn" data-expected-height="50" data-offset-y="50">
<div style="height: 50px"></div>
</div>
<div style="width: 50px;" class="firstRowSecondColumn" data-expected-height="100" data-offset-y="25">
<div style="height: 100px"></div>
</div>
</div>
<script>
document.body.offsetLeft;
document.getElementById("toStretch").style.alignItems = "stretch";
document.getElementById("fromStretch").style.alignItems = "center";
checkLayout(".grid");
</script>