grid-aspect-ratio-022.html (997B)
1 <!DOCTYPE html> 2 <title>CSS aspect-ratio: grid track size should respect aspect-ratio when the 3 ratio-dependent axis is the block axis</title> 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"> 6 <link rel="help" href="https://drafts.csswg.org/css-grid/#algo-track-sizing"> 7 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> 8 <style> 9 #reference-overlapped-red { 10 position: absolute; 11 background-color: red; 12 width: 100px; 13 height: 100px; 14 z-index: -1; 15 } 16 </style> 17 18 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 19 20 <div id="reference-overlapped-red"></div> 21 <div style="display: grid; width: 100px; background: green;"> 22 <div style="width: 100px; aspect-ratio: 2/1;"></div> 23 <div style="width: 100px; aspect-ratio: 1/1; max-height: 25px;"></div> 24 <div style="width: 100px; aspect-ratio: 1/.1; min-height: 25px;"></div> 25 </div>