summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item.html
blob: 9f162b5155b7e627c9855aa09934d74a1895499d (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
<!DOCTYPE html>
<html>
<script src="../../resources/check-layout.js"></script>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
    padding: 10px;
    border-top: 10px dotted blue;
    border-right: 20px dotted blue;
    border-bottom: 30px dotted blue;
    border-left: 40px dotted blue;
    grid-template-rows: 100px 100px;
    grid-template-columns: 100px 100px;
    width: 200px;
}

.item {
   width: 20px;
   height: 40px;
}
</style>
</head>
<body onload="checkLayout('.grid')">

<div>This test checks that the grid items are shifted by the grid container's paddings and borders before / start.</div>

<div style="position: relative">
    <div class="grid" data-expected-width="280" data-expected-height="260">
        <div class="item firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
    </div>
</div>

<div style="position: relative">
    <div class="grid verticalRL" data-expected-width="280" data-expected-height="260">
        <div class="item firstRowFirstColumn" data-offset-x="230" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item firstRowSecondColumn" data-offset-x="230" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowFirstColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
    </div>
</div>

<div style="position: relative">
    <div class="grid verticalLR" data-expected-width="280" data-expected-height="260">
        <div class="item firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
    </div>
</div>

<!-- rtl direction -->
<div style="position: relative">
    <div class="grid directionRTL" data-expected-width="280" data-expected-height="260">
        <div class="item firstRowFirstColumn" data-offset-x="230" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item firstRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowFirstColumn" data-offset-x="230" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
    </div>
</div>

<div style="position: relative">
    <div class="grid verticalRL directionRTL" data-expected-width="280" data-expected-height="260">
        <div class="item firstRowFirstColumn" data-offset-x="230" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
        <div class="item firstRowSecondColumn" data-offset-x="230" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowFirstColumn" data-offset-x="130" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowSecondColumn" data-offset-x="130" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
    </div>
</div>

<div style="position: relative">
    <div class="grid verticalLR directionRTL" data-expected-width="280" data-expected-height="260">
        <div class="item firstRowFirstColumn" data-offset-x="50" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
        <div class="item firstRowSecondColumn" data-offset-x="50" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowFirstColumn" data-offset-x="150" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
        <div class="item secondRowSecondColumn" data-offset-x="150" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
    </div>
</div>

</body>
</html>