summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-percent-track-margin-border-padding.html
blob: cbaa40250e20d942bb0e847994e64974d2f5f971 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html>
<head>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
    width: 100px;
    height: 100px;
    grid-template-columns: 20% 50% 30%;
    grid-template-rows: 40% 60%;
}

.margin {
    margin: 10px;
}

.border {
    border: 5px solid black;
}

.padding {
    padding: 20px;
}
</style>
<script src="../../resources/check-layout.js"></script>
</head>
<body onload="checkLayout('.grid');">
    <p>This test checks that percentage tracks ignore grid container's margin, border and padding in order to calculate their breadths.</p>

    <div class="grid">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>

    <div class="grid margin">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>

    <div class="grid border">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>

    <div class="grid padding">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>

    <div class="grid margin border">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>

    <div class="grid margin padding">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>

    <div class="grid border padding">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>

    <div class="grid margin border padding">
        <div data-expected-width="20" data-expected-height="40"></div>
        <div data-expected-width="50" data-expected-height="40"></div>
        <div data-expected-width="30" data-expected-height="40"></div>
        <div data-expected-width="20" data-expected-height="60"></div>
        <div data-expected-width="50" data-expected-height="60"></div>
        <div data-expected-width="30" data-expected-height="60"></div>
    </div>
</body>
</html>