position-absolute-dynamic-list-marker.html (918B)
1 <!DOCTYPE html> 2 <html class='reftest-wait'> 3 <link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> 4 <link rel="help" href="https://www.w3.org/TR/css-position-3/" /> 5 <meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly."/> 6 <script src="/common/reftest-wait.js"></script> 7 <style> 8 ul { 9 margin: 0; 10 padding: 0; 11 width: 100px; 12 height: 100px; 13 background: red; 14 } 15 16 #target { 17 position: absolute; 18 width: 100px; 19 height: 100px; 20 background: green; 21 } 22 ::marker { color: white; } 23 </style> 24 <p>Test passes if there is a filled green square.</p> 25 <ul> 26 <li style="position: relative;"> 27 <div style="height: 50px;"></div> 28 <div id=target></div> 29 </li> 30 </ul> 31 <script> 32 document.body.offsetTop; 33 const target = document.getElementById('target'); 34 target.style.top = '0px'; 35 document.body.offsetTop; 36 takeScreenshot(); 37 </script>