grid-gap-smaller-001.html (1564B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html><head> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: subgrid grid-gap:0px</title> 9 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 10 <link rel="help" href="https://drafts.csswg.org/css-grid-2"> 11 <link rel="match" href="grid-gap-smaller-001-ref.html"> 12 <style> 13 html,body { 14 color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0; 15 } 16 17 .wrapper { 18 display: grid; 19 gap: 20px; 20 grid-template-columns: 150px 100px 150px 100px; 21 grid-template-rows: repeat(3,auto); 22 background-color: #fff; 23 color: #444; 24 } 25 26 .box { 27 background-color: #444; 28 color: #fff; 29 padding: 20px; 30 } 31 32 .box .box { 33 background-color: #ccc; 34 color: #444; 35 } 36 37 .a { 38 grid-column: 1 / 3; 39 } 40 41 .b { 42 grid-column: 4 ; 43 } 44 45 .c { 46 grid-column: 1; 47 grid-row: 2 / 4; 48 } 49 50 .box .f { background-color: purple; } 51 .box .i { background-color: blue; } 52 .box .e { background-color: yellow; } 53 54 .d { 55 grid-column: 2 / 5; 56 grid-row: 2 / 4; 57 display: grid; 58 gap: 0; 59 grid: subgrid / subgrid; 60 } 61 62 </style> 63 </head> 64 <body> 65 66 <div class="wrapper"> 67 <div class="box a">A</div> 68 <div class="box b">B</div> 69 <div class="box c">C</div> 70 <div class="box d"> 71 <div class="box e">E</div> 72 <div class="box f">F</div> 73 <div class="box g">G</div> 74 <div class="box h">H</div> 75 <div class="box i">I</div> 76 </div> 77 </div> 78 79 </body> 80 </html>