grid-max-content-size-with-max-content-item.html (835B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-grid-2/#intrinsic-sizes"> 6 <link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> 7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 8 <meta name="assert" content="Grid item's min content contribution should be its max-content size"> 9 <style> 10 .grid-box { 11 display: grid; 12 width: max-content; 13 grid-template-columns: min-content; 14 font: 20px/1 Ahem; 15 background-color: green; 16 } 17 .grid-item { 18 width: max-content; 19 color: green; 20 } 21 </style> 22 </head> 23 <body> 24 <p>Test passes if there is a filled green square.</p> 25 <div class="grid-box"> 26 <div class="grid-item">x x x</div> 27 <div style="height: 80px;"></div> 28 </div> 29 </body> 30 </html>