<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-block">
<meta name="assert" content="block-end margins in nested content should be trimmed when they collapse through to the outer block container">
<style>
.outer {
margin-trim: block;
}
container {
display: block;
}
item {
display: block;
margin-block-end: 40px;
inline-size: 50px;
block-size: 50px;
background-color: green;
}
.collapsed {
margin-block-start: 50px;
block-size: 0px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
</head>
<body onload="checkLayout('container > item')">
<div id="target">
<container class="outer">
<container>
<item data-offset-y="8"></item>
<item data-offset-y="58" class="collapsed"></item>
<item data-offset-y="58" class="collapsed"></item>
</container>
</container>
</div>
</body>
</html>