calc-size-aspect-ratio-003.html (569B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.csswg.org/css-values-5/#calc-size"> 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-only.html"> 5 <p>Test passes if there is a filled green square.</p> 6 <!-- The auto height is 50px, the auto min-size is 150px, which passing through the calc-size() yields 100px. --> 7 <div style="aspect-ratio: 2/1; width: 100px; min-height: calc-size(auto, size - 50px); background: green;"> 8 <div style="height: 150px;"></div> 9 </div>