block-aspect-ratio-031.html (638B)
1 <!DOCTYPE html> 2 <title>Tests a dynamic block-size change invalidates the max-content size.</title> 3 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio"> 4 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> 5 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 6 <div id="target" style="height: 50px; width: max-content; background: green;"> 7 <div style="height: 100%;"> 8 <div style="aspect-ratio: 1/1; min-height: 100%; height: 50px;"></div> 9 </div> 10 </div> 11 <script> 12 document.body.offsetTop; 13 document.getElementById('target').style.height = '100px'; 14 </script>