grid-item-non-auto-height-stretch-001.html (595B)
1 <!doctype html> 2 <title>Grid items only stretch if block-size computes to auto</title> 3 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4525"> 4 <link rel="help" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> 5 <link rel="help" href="https://mozilla.org" title="Mozilla"> 6 <link rel="match" href="grid-item-non-auto-height-stretch-ref.html"> 7 <style> 8 #grid { 9 display: grid; 10 width: 100px; 11 height: 100px; 12 grid-template: 100% / 100%; 13 background: green; 14 } 15 #item { 16 height: max-content; 17 background: red; 18 } 19 </style> 20 <div id="grid"> 21 <div id="item"></div> 22 </div>