flex-aspect-ratio-041.html (738B)
1 <!DOCTYPE html> 2 <title>CSS aspect-ratio: Test flex container's main size (block axis) honoring automatic content-based minimum</title> 3 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 4 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum"> 5 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> 6 7 <style> 8 #container { 9 display: flex; 10 flex-direction: column; 11 background: green; 12 width: 100px; 13 aspect-ratio: 2 / 1; 14 } 15 #item { 16 width: 100%; 17 height: 100px; 18 flex: none 19 } 20 </style> 21 <body> 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> 26 </body>