summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/implicit-rows-auto-resolution.html
blob: 3edcccdd5c7cdb4042860f6c6f474e1086847f77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<link href="resources/grid.css" rel="stylesheet">
<style>
.gridAutoContent {
    grid-template-columns: 50px;
    /* grid-template-rows is left unset so that the grid item's row is implicit. */
}

.firstRowFirstColumn {
    font: 10px/1 Ahem;
    /* Make us fit our grid area. */
    width: 100%;
    height: 100%;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.gridAutoContent');">

<p>Test that resolving auto tracks on grid items works properly.</p>

<div class="constrainedContainer">
    <div class="grid gridAutoContent">
        <div class="firstRowFirstColumn" data-expected-width="50" data-expected-height="30">XXXXX XXXXX XXXXX</div>
    </div>
</div>

<!-- Allow the extra logical space distribution to occur. -->
<div style="width: 40px; height: 10px">
    <div class="grid gridAutoContent">
        <div class="firstRowFirstColumn" data-expected-width="50" data-expected-height="30">XXXXX XXXXX XXXXX</div>
    </div>
</div>

<div style="width: 100px; height: 10px;">
    <div class="grid gridAutoContent">
        <div class="firstRowFirstColumn" data-expected-width="50" data-expected-height="60">XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX</div>
    </div>
</div>

</body>
</html>