<!DOCTYPE html>
<html>
<link href="resources/grid.css" rel="stylesheet">
<style>
.columnGrid {
    grid-template-columns: 50px 100px;
    /* grid-template-rows is left unset so that the grid items' row is implicit. */
    font: 10px/1 Ahem;
}

.rowGrid {
    grid-template-rows: 50px 100px;
    /* grid-template-columns is left unset so that the grid items' column is implicit. */
    font: 10px/1 Ahem;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid');">

<p>Test that negative &lt;integer&gt; positions are resolved against the explicit grid (that is don't account for implicit columns and rows).</p>

<div class="constrainedContainer">
    <div class="grid columnGrid">
        <div class="sizedToGridArea autoRowThirdColumn" data-expected-width="60" data-expected-height="30">XXXXXX XXXXX XXXXX</div>
        <div class="sizedToGridArea autoLastRowAutoLastColumn" data-expected-width="100" data-expected-height="30"></div>
    </div>
</div>

<div class="constrainedContainer">
    <div class="grid columnGrid">
        <div class="sizedToGridArea thirdRowAutoColumn" data-expected-width="50" data-expected-height="30">XXXXXX XXXXX XXXXX</div>
        <div class="sizedToGridArea autoLastRowAutoLastColumn" data-expected-width="100" data-expected-height="0"></div>
    </div>
</div>

<div class="constrainedContainer">
    <div class="grid rowGrid">
        <div class="sizedToGridArea autoRowThirdColumn" data-expected-width="60" data-expected-height="50">XXXXXX XXXXX XXXXX</div>
        <div class="sizedToGridArea autoLastRowAutoLastColumn" data-expected-width="0" data-expected-height="100"></div>
    </div>
</div>

<div class="constrainedContainer">
    <div class="grid rowGrid">
        <div class="sizedToGridArea thirdRowAutoColumn" data-expected-width="60" data-expected-height="30">XXXXXX XXXXX XXXXX</div>
        <div class="sizedToGridArea autoLastRowAutoLastColumn" data-expected-width="60" data-expected-height="100"></div>
    </div>
</div>

</body>
</html>
