flex-aspect-ratio-043.html (796B)
1 <!DOCTYPE html> 2 <title>CSS aspect-ratio: Test the definite max-block-size wins the automatic content-based minimum block-size in flex container's cross axis (block axis)</title> 3 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 4 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 5 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum"> 6 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> 7 8 <style> 9 #container { 10 display: flex; 11 inline-size: 100px; 12 aspect-ratio: 2 / 1; 13 background: green; 14 max-block-size: 100px; 15 } 16 #item { 17 flex: 1; 18 block-size: 200px; 19 } 20 </style> 21 22 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 23 <div id="container"> 24 <div id="item"></div> 25 </div>