grid-lanes-gap-002.html (2005B)
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: Grid Lanes layout with normal `gap` in both axes</title> 9 <meta name="assert" 10 content="Test passes if a 'normal' gap is the initial value, 11 is resolved to zero, 12 does not allow margin collapsing, 13 and inherits as 'normal' in grid-lanes layout"> 14 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 15 <link rel="author" title="Elika J. Etemad" href="https://fantasai.inkedblade.net/contact"> 16 <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment"> 17 <link rel="match" href="grid-lanes-gap-002-ref.html"> 18 19 <style> 20 html,body { 21 color:black; background-color:white; font:25px/1 "Courier New", monospace; padding:0; margin:0; 22 } 23 24 grid { 25 display: inline-grid-lanes; 26 grid-template-columns: repeat(4,auto); 27 color: #444; 28 border: 1px solid; 29 padding: 2px; 30 } 31 32 item { 33 background-color: #444; 34 color: #fff; 35 padding: 20px; 36 margin: 3px; 37 border: 5px solid blue; 38 display: block; 39 } 40 </style> 41 </head> 42 <body> 43 44 <!-- test initial value of normal --> 45 <grid> 46 <item style="grid-column: 1;">1</item> 47 <item style="padding:0; grid-column: 2;">2</item> 48 <item style="grid-column: 3;">3</item> 49 <item style="grid-column: 4;">4</item> 50 <item style="padding:0; grid-column: 2;">5</item> 51 </grid> 52 53 <!-- test that 'normal' is supported and also resolves to zero --> 54 <grid style="gap: 10px; gap: normal"> 55 <item style="grid-column: 1;">1</item> 56 <item style="padding:0; grid-column: 2;">2</item> 57 <item style="grid-column: 3;">3</item> 58 <item style="grid-column: 4;">4</item> 59 <item style="padding:0; grid-column: 2;">5</item> 60 </grid> 61 62 <!-- test inheritance of normal as keyword --> 63 64 <grid style="gap: 10px; gap: normal;"> 65 <div style="columns: 3; gap: inherit;"> 66 <item>1</item> 67 <item>2</item> 68 <item>3</item> 69 </div> 70 </grid>