3 <script src=
"../../resources/check-layout.js"></script>
4 <link href=
"resources/grid.css" rel=
"stylesheet">
7 border-top:
20px dotted blue;
8 border-right:
30px dotted blue;
9 border-bottom:
40px dotted blue;
10 border-left:
50px dotted blue;
11 grid-template-rows:
100px
100px;
12 grid-template-columns:
100px
100px;
22 <body onload=
"checkLayout('.grid')">
24 <div>This test checks that the grid items are shifted by the grid container's borders before and start.
</div>
26 <div style=
"position: relative">
27 <div class=
"grid" data-expected-width=
"280" data-expected-height=
"260">
28 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
29 <div class=
"item firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
30 <div class=
"item secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
31 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
35 <div style=
"position: relative">
36 <div class=
"grid verticalRL" data-expected-width=
"280" data-expected-height=
"260">
37 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
38 <div class=
"item firstRowSecondColumn" data-offset-x=
"230" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
39 <div class=
"item secondRowFirstColumn" data-offset-x=
"130" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
40 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
44 <div style=
"position: relative">
45 <div class=
"grid verticalLR" data-expected-width=
"280" data-expected-height=
"260">
46 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
47 <div class=
"item firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
48 <div class=
"item secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
49 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
53 <div style=
"position: relative">
54 <div class=
"grid horizontalBT" data-expected-width=
"280" data-expected-height=
"260">
55 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
56 <div class=
"item firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
57 <div class=
"item secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
58 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
62 <!-- rtl direciton -->
63 <div style=
"position: relative">
64 <div class=
"grid directionRTL" data-expected-width=
"280" data-expected-height=
"260">
65 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
66 <div class=
"item firstRowSecondColumn" data-offset-x=
"130" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
67 <div class=
"item secondRowFirstColumn" data-offset-x=
"230" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
68 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
72 <div style=
"position: relative">
73 <div class=
"grid verticalRL directionRTL" data-expected-width=
"280" data-expected-height=
"260">
74 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
75 <div class=
"item firstRowSecondColumn" data-offset-x=
"230" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
76 <div class=
"item secondRowFirstColumn" data-offset-x=
"130" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
77 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
81 <div style=
"position: relative">
82 <div class=
"grid verticalLR directionRTL" data-expected-width=
"280" data-expected-height=
"260">
83 <div class=
"item firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
84 <div class=
"item firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
85 <div class=
"item secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
86 <div class=
"item secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
90 <div style=
"position: relative">
91 <div class=
"grid horizontalBT directionRTL" data-expected-width=
"280" data-expected-height=
"260">
92 <div class=
"item firstRowFirstColumn" data-offset-x=
"230" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
93 <div class=
"item firstRowSecondColumn" data-offset-x=
"130" data-offset-y=
"180" data-expected-width=
"20" data-expected-height=
"40"></div>
94 <div class=
"item secondRowFirstColumn" data-offset-x=
"230" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>
95 <div class=
"item secondRowSecondColumn" data-offset-x=
"130" data-offset-y=
"80" data-expected-width=
"20" data-expected-height=
"40"></div>