4 <link href=
"resources/grid.css" rel=
"stylesheet">
5 <script src=
"../../resources/check-layout.js"></script>
12 grid-template-columns:
100px
100px;
13 grid-template-rows:
200px
200px;
14 width: -webkit-fit-content;
19 .autoMarginsTopBottom {
23 .autoMarginsRightLeft {
45 <body onload=
"checkLayout('.grid')">
47 <p>This test checks that the 'stretch' value is only applied if neither of its margins (in the appropriate axis) are 'auto'.
</p>
49 <div style=
"position: relative">
50 <div class=
"grid" data-expected-width=
"200" data-expected-height=
"400">
51 <div class=
"firstRowFirstColumn" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"100" data-expected-height=
"200">
52 <div class=
"widthAndHeightSet"></div>
54 <div class=
"autoMargins firstRowSecondColumn" data-offset-x=
"100" data-offset-y=
"0" data-expected-width=
"20" data-expected-height=
"40">
55 <div class=
"widthAndHeightSet"></div>
57 <div class=
"autoMarginsRightLeft secondRowFirstColumn" data-offset-x=
"0" data-offset-y=
"200" data-expected-width=
"20" data-expected-height=
"200">
58 <div class=
"widthAndHeightSet"></div>
60 <div class=
"autoMarginsTopBottom secondRowSecondColumn" data-offset-x=
"100" data-offset-y=
"200" data-expected-width=
"100" data-expected-height=
"40">
61 <div class=
"widthAndHeightSet"></div>
66 <div style=
"position: relative">
67 <div class=
"grid verticalRL" data-expected-width=
"400" data-expected-height=
"200">
68 <div class=
"firstRowFirstColumn" data-offset-x=
"200" data-offset-y=
"0" data-expected-width=
"200" data-expected-height=
"100">
69 <div class=
"widthAndHeightSet"></div>
71 <div class=
"autoMargins firstRowSecondColumn" data-offset-x=
"380" data-offset-y=
"100" data-expected-width=
"20" data-expected-height=
"40">
72 <div class=
"widthAndHeightSet"></div>
74 <div class=
"autoMarginsRightLeft secondRowFirstColumn" data-offset-x=
"180" data-offset-y=
"0" data-expected-width=
"20" data-expected-height=
"100">
75 <div class=
"widthAndHeightSet"></div>
77 <div class=
"autoMarginsTopBottom secondRowSecondColumn" data-offset-x=
"0" data-offset-y=
"100" data-expected-width=
"200" data-expected-height=
"40">
78 <div class=
"widthAndHeightSet"></div>
83 <div style=
"position: relative">
84 <div class=
"grid verticalLR" data-expected-width=
"400" data-expected-height=
"200">
85 <div class=
"firstRowFirstColumn" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"200" data-expected-height=
"100">
86 <div class=
"widthAndHeightSet"></div>
88 <div class=
"autoMargins firstRowSecondColumn" data-offset-x=
"0" data-offset-y=
"100" data-expected-width=
"20" data-expected-height=
"40">
89 <div class=
"widthAndHeightSet"></div>
91 <div class=
"autoMarginsRightLeft secondRowFirstColumn" data-offset-x=
"200" data-offset-y=
"0" data-expected-width=
"20" data-expected-height=
"100">
92 <div class=
"widthAndHeightSet"></div>
94 <div class=
"autoMarginsTopBottom secondRowSecondColumn" data-offset-x=
"200" data-offset-y=
"100" data-expected-width=
"200" data-expected-height=
"40">
95 <div class=
"widthAndHeightSet"></div>
100 <!-- RTL direction -->
101 <div style=
"position: relative">
102 <div class=
"grid directionRTL" data-expected-width=
"200" data-expected-height=
"400">
103 <div class=
"firstRowFirstColumn" data-offset-x=
"100" data-offset-y=
"0" data-expected-width=
"100" data-expected-height=
"200">
104 <div class=
"widthAndHeightSet"></div>
106 <div class=
"autoMargins firstRowSecondColumn" data-offset-x=
"80" data-offset-y=
"0" data-expected-width=
"20" data-expected-height=
"40">
107 <div class=
"widthAndHeightSet"></div>
109 <div class=
"autoMarginsRightLeft secondRowFirstColumn" data-offset-x=
"180" data-offset-y=
"200" data-expected-width=
"20" data-expected-height=
"200">
110 <div class=
"widthAndHeightSet"></div>
112 <div class=
"autoMarginsTopBottom secondRowSecondColumn" data-offset-x=
"0" data-offset-y=
"200" data-expected-width=
"100" data-expected-height=
"40">
113 <div class=
"widthAndHeightSet"></div>
118 <div style=
"position: relative">
119 <div class=
"grid directionRTL verticalRL" data-expected-width=
"400" data-expected-height=
"200">
120 <div class=
"firstRowFirstColumn" data-offset-x=
"200" data-offset-y=
"100" data-expected-width=
"200" data-expected-height=
"100">
121 <div class=
"widthAndHeightSet"></div>
123 <div class=
"autoMargins firstRowSecondColumn" data-offset-x=
"380" data-offset-y=
"60" data-expected-width=
"20" data-expected-height=
"40">
124 <div class=
"widthAndHeightSet"></div>
126 <div class=
"autoMarginsRightLeft secondRowFirstColumn" data-offset-x=
"180" data-offset-y=
"100" data-expected-width=
"20" data-expected-height=
"100">
127 <div class=
"widthAndHeightSet"></div>
129 <div class=
"autoMarginsTopBottom secondRowSecondColumn" data-offset-x=
"0" data-offset-y=
"60" data-expected-width=
"200" data-expected-height=
"40">
130 <div class=
"widthAndHeightSet"></div>
135 <div style=
"position: relative">
136 <div class=
"grid directionRTL verticalLR" data-expected-width=
"400" data-expected-height=
"200">
137 <div class=
"firstRowFirstColumn" data-offset-x=
"0" data-offset-y=
"100" data-expected-width=
"200" data-expected-height=
"100">
138 <div class=
"widthAndHeightSet"></div>
140 <div class=
"autoMargins firstRowSecondColumn" data-offset-x=
"0" data-offset-y=
"60" data-expected-width=
"20" data-expected-height=
"40">
141 <div class=
"widthAndHeightSet"></div>
143 <div class=
"autoMarginsRightLeft secondRowFirstColumn" data-offset-x=
"200" data-offset-y=
"100" data-expected-width=
"20" data-expected-height=
"100">
144 <div class=
"widthAndHeightSet"></div>
146 <div class=
"autoMarginsTopBottom secondRowSecondColumn" data-offset-x=
"200" data-offset-y=
"60" data-expected-width=
"200" data-expected-height=
"40">
147 <div class=
"widthAndHeightSet"></div>