<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<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;
    backgro