blob: 36bf2fe5591b8eb214cc083c1dbf6dfb3ee94c50 [file] [log] [blame]
<!DOCTYPE html>
<link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel="stylesheet">
<link href="resources/grid.css" rel="stylesheet">
<style>
.wrapper {
position: relative;
clear: both;
}
.grid {
font: 10px/1 Ahem;
}
.float {
float: left;
}
.abspos {
position: absolute;
}
.fixedSize {
width: 200px;
height: 200px;
}
.oneColumn100 {
grid-template-columns: 100%;
}
.oneColumn50 {
grid-template-columns: 50%;
}
.twoColumns {
grid-template-columns: 50% 100px;
}
</style>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/check-layout-th.js"></script>
<body onload="checkLayout('.grid')">
<div id="log"></div>
<p>This test checks that percentage columns are only indefinite during intrinsic size computation. Aftewards, they are properly resolved against the grid container intrinsic sizes.</p>
<div class="wrapper">
<div class="grid float oneColumn100" data-expected-width="40" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid abspos oneColumn100" data-expected-width="40" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid max-content oneColumn100" data-expected-width="40" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid fit-content oneColumn100" data-expected-width="40" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid min-content oneColumn100" data-expected-width="20" data-expected-height="20">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid float oneColumn50" data-expected-width="40" data-expected-height="20">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid abspos oneColumn50" data-expected-width="40" data-expected-height="20">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid max-content oneColumn50" data-expected-width="40" data-expected-height="20">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid fit-content oneColumn50" data-expected-width="40" data-expected-height="20">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid min-content oneColumn50" data-expected-width="20" data-expected-height="20">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="20">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid float twoColumns" data-expected-width="140" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10">
XX X
</div>
<div class="firstRowSecondColumn"
data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10">
</div>
</div>
</div>
<div class="wrapper">
<div class="grid abspos twoColumns" data-expected-width="140" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10">
XX X
</div>
<div class="firstRowSecondColumn"
data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10">
</div>
</div>
</div>
<div class="wrapper">
<div class="grid max-content twoColumns" data-expected-width="140" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10">
XX X
</div>
<div class="firstRowSecondColumn"
data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10">
</div>
</div>
</div>
<div class="wrapper">
<div class="grid fit-content twoColumns" data-expected-width="140" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10">
XX X
</div>
<div class="firstRowSecondColumn"
data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10">
</div>
</div>
</div>
<div class="wrapper">
<div class="grid min-content twoColumns" data-expected-width="120" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="60" data-expected-height="10">
XX X
</div>
<div class="firstRowSecondColumn"
data-offset-x="60" data-offset-y="0" data-expected-width="100" data-expected-height="10">
</div>
</div>
</div>
<div class="wrapper">
<div class="grid float twoColumns" data-expected-width="100" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10">
</div>
<div class="firstRowSecondColumn"
data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid abspos twoColumns" data-expected-width="100" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10">
</div>
<div class="firstRowSecondColumn"
data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid max-content twoColumns" data-expected-width="100" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10">
</div>
<div class="firstRowSecondColumn"
data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid min-content twoColumns" data-expected-width="100" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10">
</div>
<div class="firstRowSecondColumn"
data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10">
XX X
</div>
</div>
</div>
<div class="wrapper">
<div class="grid fit-content twoColumns" data-expected-width="100" data-expected-height="10">
<div class="firstRowFirstColumn"
data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10">
</div>
<div class="firstRowSecondColumn"
data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10">
XX X
</div>
</div>
</div>
</body>