3 <script src=
"../../resources/check-layout.js"></script>
4 <link href=
"resources/grid.css" rel=
"stylesheet">
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;
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>
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>
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>
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>
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>
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>
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>
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>