contain-layout-independent-formatting-context-002.html (948B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Containment Test: Layout containment independent formatting context</title> 4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout"> 6 <link rel="match" href="reference/contain-paint-independent-formatting-context-001-ref.html"> 7 <meta name=assert content="Layout containment elements establish an independent formatting context. The test checks that this feature of layout containment applies to inline blocks."> 8 <style> 9 .wrapper { 10 border: solid thick; 11 margin: 1em; 12 } 13 </style> 14 <p>Test passes if it has the same output than the reference.</p> 15 <div class="wrapper"> 16 <span style="display: inline-block; margin: 1em 0; vertical-align: top; contain: layout;"> 17 <div style="margin: 1em 0;">This text should have 2em top and bottom margins (margins do not collapse).</div> 18 </span> 19 </div>