grid-gutters-007.html (890B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Grid Layout Test: Support for percentage values for gap with definite height and width for grid</title> 4 <link rel="help" href="https://www.w3.org/TR/css-grid-1/#gutters"> 5 <link rel="help" href="https://www.w3.org/TR/css-align-3/#gap-shorthand"> 6 <link rel="match" href="../reference/grid-equal-gutters-ref.html"> 7 <link rel="author" title="Rachel Andrew" href="mailto:me@rachelandrew.co.uk"> 8 <style> 9 #grid { 10 display: grid; 11 width:200px; 12 height: 200px; 13 gap: 10%; 14 grid-template-columns: 90px 90px; 15 grid-template-rows: 90px 90px; 16 background-color: green; 17 } 18 19 #grid > div { 20 background-color: silver; 21 } 22 </style> 23 24 <p>The test passes if it has the same visual effect as reference.</p> 25 <div id="grid"> 26 <div></div> 27 <div></div> 28 <div></div> 29 <div></div> 30 </div>