standalone-axis-size-005.html (912B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Grid Test: Subgrid contribution size on standalone axis</title> 4 <link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-box-alignment"> 6 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> 7 <style> 8 .grid { 9 display: grid; 10 background: red; 11 width: max-content; 12 grid-template-columns: minmax(min-content, max-content); 13 } 14 .subgrid { 15 display: grid; 16 background: green; 17 width: min-content; 18 grid-template-rows: subgrid; 19 } 20 .w100 { 21 display: inline-block; 22 height: 50px; 23 width: 100px; 24 } 25 </style> 26 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 27 <div class="grid"> 28 <div class="subgrid"> 29 <div style="font-size: 0"> 30 <div class="w100"></div> 31 <div class="w100"></div> 32 </div> 33 </div> 34 </div>