flex-column-relayout-assert.html (954B)
1 <!DOCTYPE html> 2 <title>CSS Flexbox: Column height with padding</title> 3 <link href="support/flexbox.css" rel="stylesheet"> 4 <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#valdef-flex-direction-column"> 5 <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#item-margins"> 6 <meta name="assert" content="This test checks that height of flex container works with padding"> 7 <style> 8 .flexbox { 9 background-color: green; 10 } 11 </style> 12 <script src="/resources/testharness.js"></script> 13 <script src="/resources/testharnessreport.js"></script> 14 <script src="/resources/check-layout-th.js"></script> 15 <body onload="checkLayout('.flexbox')"> 16 <div id=log></div> 17 18 <p>You should see a green rectangle, 40px high.</p> 19 20 <div class="flexbox column" data-expected-height="40"> 21 <div id="child" data-expected-height="40"></div> 22 </div> 23 24 <script> 25 document.getElementById('child').offsetHeight; 26 document.getElementById('child').style.padding = "20px"; 27 </script>