grid-block-start-ref.html (746B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>margin-trim: grid-block-start</title> 5 <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> 6 <link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-grid"> 7 <meta name="assert" content="block-start should trim block-start margins of items on first row"> 8 <style> 9 grid { 10 display: inline-grid; 11 border: 1px solid black; 12 grid-template-columns: auto auto; 13 } 14 item { 15 display: block; 16 background-color: green; 17 width: 50px; 18 height: 50px; 19 } 20 .block-start-margin { 21 margin-block-start: 10px; 22 } 23 </style> 24 </head> 25 <body> 26 <grid> 27 <item></item> 28 <item></item> 29 <item class="block-start-margin"></item> 30 <item class="block-start-margin"></item> 31 </grid> 32 </body> 33 </html>