grid-gap-smaller-001-ref.html (1540B)
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>Reference: subgrid grid-gap:0px</title> 9 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 10 <style> 11 html,body { 12 color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0; 13 } 14 15 .wrapper { 16 display: grid; 17 gap: 20px; 18 grid-template-columns: 170px 100px 190px 100px; 19 grid-template-rows: repeat(3,auto); 20 gap: 0; 21 background-color: #fff; 22 color: #444; 23 } 24 25 .box { 26 background-color: #444; 27 color: #fff; 28 padding: 20px; 29 } 30 31 .box .box { 32 background-color: #ccc; 33 color: #444; 34 } 35 36 .a { 37 grid-column: 1 / 3; 38 margin-bottom: 20px; 39 } 40 41 .b { 42 grid-column: 4 ; 43 margin-bottom: 20px; 44 } 45 46 .c { 47 grid-column: 1; 48 grid-row: 2 / 4; 49 margin-right: 20px; 50 } 51 52 .box .f { background-color: purple; } 53 .box .i { background-color: blue; } 54 .box .e { background-color: yellow; } 55 56 .d { 57 grid-column: 2 / 5; 58 grid-row: 2 / 4; 59 display: grid; 60 gap: 0; 61 grid-template-columns: 90px 170px 90px; 62 } 63 64 </style> 65 </head> 66 <body> 67 68 <div class="wrapper"> 69 <div class="box a">A</div> 70 <div class="box b">B</div> 71 <div class="box c">C</div> 72 <div class="box d"> 73 <div class="box e">E</div> 74 <div class="box f">F</div> 75 <div class="box g">G</div> 76 <div class="box h">H</div> 77 <div class="box i">I</div> 78 </div> 79 </div> 80 81 </body> 82 </html>