grid-minimum-size-grid-items-013.html (1198B)
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="flags" content="ahem"> 8 <meta name="assert" content="Checks that automatic minimum size is not clamped if the grid item has not stretch alignment."> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style> 11 #reference-overlapped-red { 12 position: absolute; 13 background-color: red; 14 width: 100px; 15 height: 100px; 16 z-index: -1; 17 } 18 19 #constrained-grid { 20 display: grid; 21 grid: 10px / 10px; 22 } 23 24 #test-grid-item-overlapping-green { 25 color: green; 26 background-color: green; 27 font: 50px/1 Ahem; 28 justify-self: start; 29 align-self: start; 30 } 31 </style> 32 33 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 34 35 <div id="reference-overlapped-red"></div> 36 <div id="constrained-grid"> 37 <div id="test-grid-item-overlapping-green">IT E</div> 38 </div>