position-area-scrolling-004.tentative.html (921B)
1 <!DOCTYPE html> 2 <title>Avoid negative IMCB correctly when scrolled past the anchor</title> 3 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#scroll"> 5 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 6 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 7 <div id="scroller" style="position:relative; overflow:hidden; width:100px; height:100px; background:red;"> 8 <div style="anchor-name:--a; margin-top:150px; height:10px;"></div> 9 <div id="abspos" style="display:none; position:absolute; position-anchor:--a; position-area:top; width:100px; height:100px;"> 10 <div style="margin-top:170px; height:100px; background:green;"></div> 11 </div> 12 <div style="height:1500px;"></div> 13 </div> 14 <script> 15 scroller.scrollTop = 220; 16 abspos.style.display = "block"; 17 </script>