anchor-position-top-layer-007.html (772B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://issues.chromium.org/issues/352005194"> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/check-layout-th.js"></script> 6 <style> 7 #container { 8 position: fixed; 9 inset: 0; 10 } 11 #anchor { 12 position: fixed; 13 top: 100px; 14 left: 100px; 15 width: 50px; 16 height: 80px; 17 anchor-name: --anchor; 18 } 19 #target { 20 position: fixed; 21 inset: auto; 22 top: anchor(--anchor top); 23 left: anchor(--anchor right); 24 margin: 0; 25 } 26 </style> 27 <body onload="checkLayout('#target')"> 28 <div id="container"> 29 <div id="anchor"></div> 30 <dialog id="target" data-offset-x=150 data-offset-y=100></dialog> 31 </div> 32 <script> 33 document.getElementById('target').showModal(); 34 </script>