Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css-grid-layout / grid-element-border-padding-grid-item.html
blobb907406e7cbedf4816a2a1ed041f546578539d8e
1 <!DOCTYPE html>
2 <html>
3 <script src="../../resources/check-layout.js"></script>
4 <link href="resources/grid.css" rel="stylesheet">
5 <style>
6 .grid {
7 padding: 10px;
8 border-top: 10px dotted blue;
9 border-right: 20px dotted blue;
10 border-bottom: 30px dotted blue;
11 border-left: 40px dotted blue;
12 grid-template-rows: 100px 100px;
13 grid-template-columns: 100px 100px;
14 width: 200px;
17 .item {
18 width: 20px;
19 height: 40px;
21 </style>
22 </head>
23 <body onload="checkLayout('.grid')">
25 <div>This test checks that the grid items are shifted by the grid container's paddings and borders before / start.</div>
27 <div style="position: relative">
28 <div class="grid" data-expected-width="280" data-expected-height="260">
29 <div class="item firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
30 <div class="item firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
31 <div class="item secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
32 <div class="item secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
33 </div>
34 </div>
36 <div style="position: relative">
37 <div class="grid verticalRL" data-expected-width="280" data-expected-height="260">
38 <div class="item firstRowFirstColumn" data-offset-x="230" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
39 <div class="item firstRowSecondColumn" data-offset-x="230" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
40 <div class="item secondRowFirstColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
41 <div class="item secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
42 </div>
43 </div>
45 <div style="position: relative">
46 <div class="grid verticalLR" data-expected-width="280" data-expected-height="260">
47 <div class="item firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
48 <div class="item firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
49 <div class="item secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
50 <div class="item secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
51 </div>
52 </div>
54 <div style="position: relative">
55 <div class="grid horizontalBT" data-expected-width="280" data-expected-height="260">
56 <div class="item firstRowFirstColumn" data-offset-x="50" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
57 <div class="item firstRowSecondColumn" data-offset-x="150" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
58 <div class="item secondRowFirstColumn" data-offset-x="50" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
59 <div class="item secondRowSecondColumn" data-offset-x="150" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
60 </div>
61 </div>
63 <!-- rtl direction -->
64 <div style="position: relative">
65 <div class="grid directionRTL" data-expected-width="280" data-expected-height="260">
66 <div class="item firstRowFirstColumn" data-offset-x="230" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
67 <div class="item firstRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
68 <div class="item secondRowFirstColumn" data-offset-x="230" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
69 <div class="item secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
70 </div>
71 </div>
73 <div style="position: relative">
74 <div class="grid verticalRL directionRTL" data-expected-width="280" data-expected-height="260">
75 <div class="item firstRowFirstColumn" data-offset-x="230" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
76 <div class="item firstRowSecondColumn" data-offset-x="230" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
77 <div class="item secondRowFirstColumn" data-offset-x="130" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
78 <div class="item secondRowSecondColumn" data-offset-x="130" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
79 </div>
80 </div>
82 <div style="position: relative">
83 <div class="grid verticalLR directionRTL" data-expected-width="280" data-expected-height="260">
84 <div class="item firstRowFirstColumn" data-offset-x="50" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
85 <div class="item firstRowSecondColumn" data-offset-x="50" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
86 <div class="item secondRowFirstColumn" data-offset-x="150" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
87 <div class="item secondRowSecondColumn" data-offset-x="150" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
88 </div>
89 </div>
91 <div style="position: relative">
92 <div class="grid horizontalBT directionRTL" data-expected-width="280" data-expected-height="260">
93 <div class="item firstRowFirstColumn" data-offset-x="230" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
94 <div class="item firstRowSecondColumn" data-offset-x="130" data-offset-y="180" data-expected-width="20" data-expected-height="40"></div>
95 <div class="item secondRowFirstColumn" data-offset-x="230" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
96 <div class="item secondRowSecondColumn" data-offset-x="130" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
97 </div>
98 </div>
100 </body>
101 </html>