tor-browser

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

position-absolute-dynamic-overflow-002.html (1015B)


      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 #scrollable {
      9  width: 100px;
     10  overflow: auto;
     11 }
     12 
     13 #container {
     14  width: 100px;
     15  height: 50px;
     16  position: relative;
     17  background: green;
     18 }
     19 
     20 #target {
     21  position: absolute;
     22  width: 50px;
     23  height: 20px;
     24  left: 200px;
     25 }
     26 
     27 #green {
     28  width: 100px;
     29  height: 50px;
     30  background: green;
     31 }
     32 </style>
     33 <p>Test passes if there is a filled green square.</p>
     34 <div id="scrollable">
     35  <div id="container">
     36    <div id="target"></div>
     37  </div>
     38 </div>
     39 <div id="green"></div>
     40 <script>
     41 document.body.offsetTop;
     42 const target = document.getElementById('target');
     43 target.style.left = 'initial';
     44 document.body.offsetTop;
     45 takeScreenshot();
     46 </script>