abspos-descendent-001.html (1322B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Flexbox: removing abspos descendents</title> 5 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers"> 6 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items"> 7 <link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=167566"> 8 <meta name="assert" content="This test ensures that flex item's padding doesn't disappear when an abspos descendent is removed."> 9 <link href="../support/flexbox.css" rel="stylesheet"> 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 <script src="/resources/check-layout-th.js"></script> 13 <script> 14 window.onload = function() { 15 document.body.offsetHeight; 16 17 document.getElementById('to-hide').style.display = "none"; 18 checkLayout(".flexbox"); 19 }; 20 </script> 21 </head> 22 <body> 23 <div id=log></div> 24 <div class="flexbox" style="height: 100px;" data-expected-height="100"> 25 <div style="width: 100%; overflow: auto; padding-bottom: 100px; background-color: red;" data-expected-height="100"> 26 <div style="position: relative; height: 100px; background-color: green;" data-expected-height="100"> 27 <div id="to-hide" style="position: absolute;" data-expected-height="0"></div> 28 </div> 29 </div> 30 </div> 31 </body> 32 </html>