tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

position-absolute-dynamic-overflow-001.html (960B)


      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 scrollbars dissappear when an absolute positioned element no longer triggers overflow."/>
      6 <script src="/common/reftest-wait.js"></script>
      7 <style>
      8 #container {
      9  position: relative;
     10  background: red;
     11 
     12  box-sizing: border-box;
     13  width: 100px;
     14  max-height: 100px;
     15  overflow: auto;
     16 }
     17 
     18 #target {
     19  position: absolute;
     20  width: 100px;
     21  height: 200px;
     22 }
     23 </style>
     24 <p>Test passes if there is a filled green square.</p>
     25 <div id="container">
     26  <div id="target"></div>
     27  <div style="height: 100px; background: green;"></div>
     28 </div>
     29 <script>
     30 document.body.offsetTop;
     31 const target = document.getElementById('target');
     32 target.style.width = '50px';
     33 target.style.height = '50px';
     34 document.body.offsetTop;
     35 takeScreenshot();
     36 </script>