summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-resolution.html
blob: 54b5f76ac604210bcb0689339a6940e292a7e5f3 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE HTML>
<html>
<head>
<script>
if (window.testRunner)
    testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1);
</script>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
    grid-template-rows: 20px;
    grid-template-columns: 10px;
}

.gridAutoFixedFixed {
    grid-auto-rows: 30px;
    grid-auto-columns: 50px;
}

.gridAutoMinMax {
    height: 1000px;
    grid-auto-rows: minmax(10%, 15px);
    grid-auto-columns: minmax(30%, 100px);
}

.gridAutoMinMaxContent {
    grid-auto-rows: min-content;
    grid-auto-columns: max-content;
}
</style>
</head>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid');">

<div>This test checks that implicit rows / columns obey grid-auto-{rows|columns}.</div>

<div class="unconstrainedContainer" style="position: relative">
    <div class="grid gridAutoFixedFixed">
        <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="10" data-offset-y="20" data-expected-width="50" data-expected-height="30">XXXXX XXXXXX</div>
    </div>
</div>

<div class="unconstrainedContainer" style="position: relative">
    <div class="grid gridAutoMinMax">
        <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="10" data-offset-y="20" data-expected-width="300" data-expected-height="100">XXXXX XXXXXX</div>
    </div>
</div>

<div class="unconstrainedContainer" style="position: relative">
    <div class="grid gridAutoMinMaxContent">
        <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="10" data-offset-y="20" data-expected-width="120" data-expected-height="10">XXXXX XXXXXX</div>
    </div>
</div>

</body>
</html>