3 <script src=
"../../resources/check-layout.js"></script>
4 <link href=
"resources/grid.css" rel=
"stylesheet">
7 grid-template-rows:
100px
100px;
8 grid-template-columns:
100px
100px;
13 margin:
20px
30px
40px
50px;
19 <body onload=
"checkLayout('.grid')">
21 <div>This test checks that the grid items are shifted by theirs before and start margins inside their grid area.
</div>
23 <div style=
"position: relative">
24 <div class=
"grid" data-expected-width=
"200" data-expected-height=
"200">
25 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
26 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
27 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
28 <div class=
"gridItem 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=
"200" data-expected-height=
"200">
34 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
35 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
36 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
37 <div class=
"gridItem secondRowSecondColumn" data-offset-x=
"50" 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=
"200" data-expected-height=
"200">
43 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
44 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
45 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
46 <div class=
"gridItem 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=
"200" data-expected-height=
"200">
52 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
53 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
54 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
55 <div class=
"gridItem secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
59 <!-- rtl direction -->
60 <div style=
"position: relative">
61 <div class=
"grid directionRTL" data-expected-width=
"200" data-expected-height=
"200">
62 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
63 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
64 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
65 <div class=
"gridItem secondRowSecondColumn" data-offset-x=
"50" 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=
"200" data-expected-height=
"200">
71 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
72 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
73 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
74 <div class=
"gridItem secondRowSecondColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
78 <div style=
"position: relative">
79 <div class=
"grid verticalLR directionRTL" data-expected-width=
"200" data-expected-height=
"200">
80 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
81 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
82 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
83 <div class=
"gridItem secondRowSecondColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
87 <div style=
"position: relative">
88 <div class=
"grid horizontalBT directionRTL" data-expected-width=
"200" data-expected-height=
"200">
89 <div class=
"gridItem firstRowFirstColumn" data-offset-x=
"150" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
90 <div class=
"gridItem firstRowSecondColumn" data-offset-x=
"50" data-offset-y=
"120" data-expected-width=
"20" data-expected-height=
"40"></div>
91 <div class=
"gridItem secondRowFirstColumn" data-offset-x=
"150" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>
92 <div class=
"gridItem secondRowSecondColumn" data-offset-x=
"50" data-offset-y=
"20" data-expected-width=
"20" data-expected-height=
"40"></div>