summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-implicit-grid.html
blob: 516fc299811dc318e974b2335f04e5ae31326c2c (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>
<link href="resources/grid.css" rel="stylesheet">
<style>

.grid {
    width: 200px;
    height: 200px;
    border: 5px solid black;
    margin: 30px;
    padding: 15px;
    /* Ensures that the grid container is the containing block of the absolutely positioned grid children. */
    position: relative;
}

.grid-columns-rows {
    grid-template-columns: 100px;
    grid-template-rows: 50px;
}

.absolute {
    position: absolute;
}

</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid')">

<p>This test checks the behavior of the absolutely positioned grid items placed on the implicit grid.</p>

<div class="grid">
    <div class="sizedToGridArea absolute secondRowSecondColumn"
        data-offset-x="15" data-offset-y="15" data-expected-width="230" data-expected-height="230">
    </div>
    <div class="sizedToGridArea absolute endSecondRowEndSecondColumn"
        data-offset-x="15" data-offset-y="15" data-expected-width="230" data-expected-height="230">
    </div>
    <div class="sizedToGridArea absolute onlySecondRowOnlySecondColumn"
        data-offset-x="15" data-offset-y="15" data-expected-width="230" data-expected-height="230">
    </div>
</div>

<div class="grid grid-columns-rows">
    <div class="sizedToGridArea absolute secondRowSecondColumn"
        data-offset-x="115" data-offset-y="65" data-expected-width="115" data-expected-height="165">
    </div>
    <div class="sizedToGridArea absolute endSecondRowEndSecondColumn"
        data-offset-x="15" data-offset-y="15" data-expected-width="230" data-expected-height="230">
    </div>
    <div class="sizedToGridArea absolute onlySecondRowOnlySecondColumn"
        data-offset-x="115" data-offset-y="65" data-expected-width="115" data-expected-height="165">
    </div>
</div>

</body>
</html>