Status: PASS | Duration: 8ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/CSS2/box-display/block-in-inline-at-start-with-margin-top-collapses-with-parent.html
<!DOCTYPE html> <title>CSS Test: block-in-inline at parent start with margin-top collapses with parent</title> <link rel="help" href="https://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"> <link rel="help" href="https://www.w3.org/TR/CSS21/box.html#collapsing-margins"> <link rel="match" href="block-in-inline-at-start-with-margin-top-collapses-with-parent-ref.html"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> <meta name="assert" content="A block-in-inline's margin-top at the start of its parent collapses with the parent's margin-top and out to its preceding sibling."> <style> .prior { width: 100px; height: 20px; background: green; } .parent { width: 100px; font: 20px/1 Ahem; } .inner { width: 100px; height: 20px; margin-top: 40px; background: green; } </style> <p>Two green squares separated by a 40px gap.</p> <div class="prior"></div> <div class="parent"> <span><div class="inner"></div></span> </div>
/css/CSS2/box-display/block-in-inline-at-start-with-margin-top-collapses-with-parent-ref.html
<!DOCTYPE html> <title>CSS Reference</title> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> <style> .prior { width: 100px; height: 20px; background: green; } .parent { width: 100px; font: 20px/1 Ahem; } .inner { width: 100px; height: 20px; margin-top: 40px; background: green; } </style> <p>Two green squares separated by a 40px gap.</p> <div class="prior"></div> <div class="parent"> <div class="inner"></div> </div>