grid-minimum-size-grid-items-020.html (1211B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Grid Layout Test: Minimum size of grid items</title> 4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> 5 <link rel="help" href="http://www.w3.org/TR/css-grid-1/#min-size-auto" title="6.5. Implied Minimum Size of Grid Items"> 6 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> 7 <meta name="assert" content="Checks that automatic minimum size is clamped if the grid item only spans fixed grid tracks."> 8 <style> 9 #reference-overlapped-red { 10 position: absolute; 11 background-color: red; 12 width: 100px; 13 height: 100px; 14 z-index: -1; 15 } 16 17 #constrained-grid { 18 display: grid; 19 width: 200px; 20 height: 500px; 21 grid: 10% 30px 20px / 50px 30px 10%; 22 } 23 24 #test-grid-item-overlapping-green { 25 background-color: green; 26 grid-row: span 3; 27 grid-column: span 3; 28 } 29 30 #content-200x200 { 31 width: 200px; 32 height: 200px; 33 } 34 </style> 35 36 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 37 38 <div id="reference-overlapped-red"></div> 39 <div id="constrained-grid"> 40 <div id="test-grid-item-overlapping-green"> 41 <div id="content-200x200"></div> 42 </div> 43 </div>