Files
sousa-gecko/testing/web-platform/tests/css/CSS2/box-display/block-in-inline-zero-height-margin-collapse.html
T
Sammy Gill 27c48f318f Bug 2041570 [wpt PR 60073] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=314969, a=testonly
Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=314969 (#60073)
--

wpt-commits: 3a1ecec2ee45a5de8838954b88121d0a1851a7db
wpt-pr: 60073
2026-05-29 15:58:52 +00:00

20 lines
1023 B
HTML

<!DOCTYPE html>
<title>CSS Test: empty block-in-inline collapses through its own margins</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-zero-height-margin-collapse-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<meta name="assert" content="A zero-height block-in-inline with margin-top and margin-bottom has its top and bottom margins adjoin and collapse together.">
<style>
.container { width: 100px; font: 20px/1 Ahem; }
.before { width: 100px; height: 20px; background: green; }
.empty { width: 100px; height: 0; margin-top: 30px; margin-bottom: 40px; background: red; }
.after { width: 100px; height: 20px; background: green; }
</style>
<p>Two green squares with a 40px gap; no red.</p>
<div class="container">
<div class="before"></div>
<span><div class="empty"></div></span>
<div class="after"></div>
</div>