OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <link href="resources/flexbox.css" rel="stylesheet"> | 3 <link href="resources/flexbox.css" rel="stylesheet"> |
4 <style> | 4 <style> |
5 body { | 5 body { |
6 margin: 0; | 6 margin: 0; |
7 } | 7 } |
8 .flexbox { | 8 .flexbox { |
9 background-color: green; | 9 background-color: green; |
10 height: 100px; | 10 height: 100px; |
11 width: 100px; | 11 width: 100px; |
12 margin: 10px; | 12 margin: 10px; |
13 } | 13 } |
14 .flexbox > * { | 14 .flexbox > * { |
15 -webkit-flex: none; | 15 flex: none; |
16 -moz-flex: none; | |
17 } | 16 } |
18 .relative { | 17 .relative { |
19 position: relative; | 18 position: relative; |
20 } | 19 } |
21 .flexbox > div { | 20 .flexbox > div { |
22 width: 20px; | 21 width: 20px; |
23 height: 20px; | 22 height: 20px; |
24 } | 23 } |
25 .absolute { | 24 .absolute { |
26 position: absolute; | 25 position: absolute; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 var beforePosition = absolute.getBoundingClientRect(); | 140 var beforePosition = absolute.getBoundingClientRect(); |
142 document.querySelector('.flexbox').style.height = '101px'; | 141 document.querySelector('.flexbox').style.height = '101px'; |
143 var afterPosition = absolute.getBoundingClientRect(); | 142 var afterPosition = absolute.getBoundingClientRect(); |
144 | 143 |
145 // Positioned element should not change position when the height of it's parent
flexbox is changed. | 144 // Positioned element should not change position when the height of it's parent
flexbox is changed. |
146 for (key in beforePosition) | 145 for (key in beforePosition) |
147 shouldBe('beforePosition[key]', 'afterPosition[key]'); | 146 shouldBe('beforePosition[key]', 'afterPosition[key]'); |
148 </script> | 147 </script> |
149 </body> | 148 </body> |
150 </html> | 149 </html> |
OLD | NEW |