dynamic-toolbar-fixed-top-1.html (941B)
1 <!DOCTYPE HTML> 2 <!-- 3 Tests that setting a fixed top margin in the compositor results 4 in the margin being applied to an element fixed to the top. 5 6 The fixed margin is specified as a test-pref in reftest.list. 7 8 The purpose of the fixed margin is to compensate for the transform that the 9 dynamic toolbar applies to the entire content area. We don't have a way of 10 simulating that transform in a reftest, so the fixed margin in isolation will 11 cause the fixed element to be offset from the top of the screen, and in 12 the ref page we use a regular CSS "margin-top" to match the rendering. 13 --> 14 <html> 15 <meta name="viewport" content="width=device-width"> 16 <style> 17 html { 18 scrollbar-width: none; 19 } 20 #scrolled { 21 height: 2000px; 22 width: 100%; 23 } 24 #fixed { 25 width: 100%; 26 height: 200px; 27 position: fixed; 28 top: 0; 29 background: red; 30 } 31 </style> 32 <body> 33 <div id="scrolled"></div> 34 <div id="fixed"></div> 35 </body> 36 </html>