grid-aspect-ratio-024.html (1092B)
1 <!DOCTYPE html> 2 <title>CSS aspect-ratio: grid track size should respect aspect-ratio when the 3 ratio-dependent axis is the inline axis and the width of the container is 4 min-content</title> 5 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 6 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio"> 7 <link rel="help" href="https://drafts.csswg.org/css-grid/#algo-track-sizing"> 8 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> 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>.</p> 20 21 <div id="reference-overlapped-red"></div> 22 <div style="display: grid; width: min-content; grid-auto-flow: column; height: 100px; background: green;"> 23 <div style="height: 100px; aspect-ratio: 1/2;"></div> 24 <div style="height: 100px; aspect-ratio: 1/1; max-width: 25px;"></div> 25 <div style="height: 100px; aspect-ratio: .1/1; min-width: 25px;"></div> 26 </div>