grid-aspect-ratio-039.html (734B)
1 <!DOCTYPE html> 2 <title>CSS aspect-ratio: Test grid container's block size 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: grid; 10 width: 100px; 11 aspect-ratio: 2 / 1; 12 background: green; 13 /* height: auto */ 14 /* min-height: auto */ 15 } 16 #item { 17 width: 100%; 18 height: 100px; 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>