flex-aspect-ratio-037.html (851B)
1 <!DOCTYPE html> 2 <title>aspect-ratio flex item</title> 3 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-main-item" 4 title="Part E"> 5 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> 6 <meta name="assert" 7 content="max-content block size accounts for inline max-content size of an aspect-ratio item when computing flex base size"> 8 9 <style> 10 #reference-overlapped-red { 11 position: absolute; 12 background-color: red; 13 width: 100px; 14 height: 100px; 15 z-index: -1; 16 } 17 </style> 18 19 <p>Test passes if there is a filled green square and <strong>no red</strong>. 20 </p> 21 22 <div id="reference-overlapped-red"></div> 23 <div style="display: flex; flex-flow: column; align-items: start;"> 24 <div style="aspect-ratio: 1/1; background: green; min-height: 0px;"> 25 <div style="width: 100px;"></div> 26 </div> 27 </div>