<!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">
<title>margin-trim: block-container-float-block-end-up-to-content-block-layout-different-containers</title>
<meta name="assert" content="block-end of a float should have its margin trimmed up to the content in its BFC">
<style>
container {
    display: flow-root;
    width: 100px;
    background-color: green;
}
item {
    display: block;
    width: 50px;
    height: 40px;
}
.float {
    float: right;
    height: 30px;
    background-color: green;
    margin-block-end: 100px;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<container>
<item></item>
<div style="border: 10px solid green; margin-trim: block;">
<item class="float"></item>
</div>
<item></item>
</container>
</body>
</html>
