block-container-block-start-001.html (878B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>margin-trim: block-container-block-start-001</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-block"> 7 <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> 8 <meta name="assert" content="block-start should trim block start margin for block-level first child"> 9 <style> 10 .container { 11 background-color: green; 12 width: min-content; 13 margin-trim: block-start; 14 } 15 .outer { 16 background-color: green; 17 width: 100px; 18 height: 50px; 19 } 20 .child { 21 width: 100px; 22 margin-top: 50px; 23 height: 50px; 24 } 25 </style> 26 </head> 27 <body> 28 <p>Test passes if there is a filled green square.</p> 29 <div class="outer"></div> 30 <div class="container"> 31 <div class="child"></div> 32 </div> 33 </body> 34 </html>