grid-gap-decorations-055.html (1037B)
1 <!DOCTYPE html> 2 <title> 3 CSS Gap Decorations: Grid gap segments are painted properly with empty areas. Tests 4 scenario where *rule-visibility-items is `around` and *-rule-break is `spanning-item`. 5 </title> 6 <link rel="help" href="https://www.w3.org/TR/css-gaps-1/"> 7 <link rel="match" href="grid-gap-decorations-055-ref.html"> 8 <link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com"> 9 10 <style> 11 body { 12 margin: 0px; 13 } 14 15 .grid { 16 display: grid; 17 grid-template: repeat(3, 100px) / repeat(3, 100px); 18 gap: 20px; 19 row-rule: 6px solid red; 20 column-rule: 6px solid blue; 21 rule-inset: 0px; 22 23 column-rule-visibility-items: around; 24 row-rule-visibility-items: around; 25 } 26 27 .item { 28 width: 100%; 29 height: 100%; 30 background: lightgray; 31 opacity: 0.8; 32 } 33 </style> 34 <div class="grid"> 35 <div class="item" style="grid-area: 1 / 1 / 2 / 3"></div> 36 <div class="item" style="grid-area: 1 / 3 / 4 / 4"></div> 37 <div class="item" style="grid-area: 2 / 1 / 3 / 2"></div> 38 </div>