3 <script src=
"../../resources/check-layout.js"></script>
4 <link href=
"resources/grid.css" rel=
"stylesheet">
7 padding:
20px
30px
40px
50px;
8 grid-template-rows:
100px
100px;
9 grid-template-columns:
100px
100px;
19 <body onload=
"checkLayout('.grid')">
21 <div>This test checks that the grid items are shifted by the grid container's paddings before and start.
</div>
23 <div style=
"position: relative">
24 <div class=
"grid" data-expected-width=
"280" data-expected-height=
"260">
25 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
26 <div class=
"item firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
27 <div class=
"item secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
28 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
32 <div style=
"position: relative">
33 <div class=
"grid verticalRL" data-expected-width=
"280" data-expected-height=
"260">
34 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
35 <div class=
"item firstRowSecondColumn" data-offset-x=
"230" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
36 <div class=
"item secondRowFirstColumn" data-offset-x=
"130" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
37 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
41 <div style=
"position: relative">
42 <div class=
"grid verticalLR" data-expected-width=
"280" data-expected-height=
"260">
43 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
44 <div class=
"item firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
45 <div class=
"item secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
46 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
50 <div style=
"position: relative">
51 <div class=
"grid horizontalBT" data-expected-width=
"280" data-expected-height=
"260">
52 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
53 <div class=
"item firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
54 <div class=
"item secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
55 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
59 <!-- rtl direciton -->
60 <div style=
"position: relative">
61 <div class=
"grid directionRTL" data-expected-width=
"280" data-expected-height=
"260">
62 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
63 <div class=
"item firstRowSecondColumn" data-offset-x=
"130" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
64 <div class=
"item secondRowFirstColumn" data-offset-x=
"230" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
65 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
69 <div style=
"position: relative">
70 <div class=
"grid verticalRL directionRTL" data-expected-width=
"280" data-expected-height=
"260">
71 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
72 <div class=
"item firstRowSecondColumn" data-offset-x=
"230" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
73 <div class=
"item secondRowFirstColumn" data-offset-x=
"130" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
74 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
78 <div style=
"position: relative">
79 <div class=
"grid verticalLR directionRTL" data-expected-width=
"280" data-expected-height=
"260">
80 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
81 <div class=
"item firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
82 <div class=
"item secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
83 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
87 <div style=
"position: relative">
88 <div class=
"grid horizontalBT directionRTL" data-expected-width=
"280" data-expected-height=
"260">
89 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
90 <div class=
"item firstRowSecondColumn" data-offset-x=
"130" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
91 <div class=
"item secondRowFirstColumn" data-offset-x=
"230" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
92 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>