contribution-size-flex-tracks-001.html (1034B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html> 7 <head> 8 <meta charset="utf-8"> 9 <title>CSS Grid Test: Subgrid contribution size to flexible tracks</title> 10 <link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"> 11 <link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-size-contribution"> 12 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> 13 <style> 14 .grid { 15 background: red; 16 display: inline-grid; 17 grid-template: repeat(4, minmax(0, 1fr)) / repeat(10, minmax(0, 1fr)); 18 } 19 .subgrid { 20 width: 50px; 21 height: 50px; 22 background: green; 23 display: grid; 24 grid-row: 1 / -1; 25 grid-column: 1 / -1; 26 grid-template: subgrid / subgrid; 27 } 28 .item { 29 width: 10px; 30 height: 25px; 31 } 32 </style> 33 </head> 34 <body> 35 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 36 <div class="grid"> 37 <div class="subgrid"> 38 <div class="item"></div> 39 </div> 40 </div> 41 </body> 42 </html>