grid-minimum-size-grid-items-004.html (1161B)
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.6. 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 minimum size for grid items is the specified size regardless of the content size."> 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: 10px; 20 height: 10px; 21 } 22 23 #test-grid-item-overlapping-green { 24 background-color: green; 25 width: 100px; 26 height: 100px; 27 } 28 29 #content-50x50 { 30 width: 50px; 31 height: 50px; 32 } 33 </style> 34 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 35 36 <div id="reference-overlapped-red"></div> 37 <div id="constrained-grid"> 38 <div id="test-grid-item-overlapping-green"> 39 <div id="content-50x50"></div> 40 </div> 41 </div>