grid-lanes-gap-001-ref.html (968B)
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: Grid Lanes layout with definite `gap` in both axes</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:25px/1 "Courier New", monospace; padding:0; margin:0; 13 } 14 15 grid { 16 display: inline-grid; 17 gap: 10px 20px; 18 grid-template-columns: auto min-content repeat(2,auto); 19 color: #444; 20 border: 1px solid; 21 padding: 2px; 22 } 23 24 item { 25 background-color: #444; 26 color: #fff; 27 padding: 20px; 28 margin: 3px; 29 border: 5px solid blue; 30 place-self: start; 31 grid-row: span 2; 32 } 33 </style> 34 </head> 35 <body> 36 37 <grid> 38 <item>1</item> 39 <item style="padding:0; grid-row: span 1">2</item> 40 <item>3</item> 41 <item>4</item> 42 <item style="padding:0; grid-column: 2; grid-row: 2">5</item> 43 </grid>