<!-- webkit-test-runner [ InlineFormattingContextIntegrationEnabled=false ] -->
<!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="Float that intersects another float during placement should be able to trim its margins and no longer intersect the other">
<style>
container {
    display: block;
    inline-size: 100px;
    font-family: monospace;
    font-size: 10px;
    margin-trim: inline;
}
item {
    display: block;
    inline-size: 50px;
    block-size: 100px;
    background-color: green;
}
.float-right {
    float: right;
}
.float-left {
    float: left;
    margin-inline-start: 80px;
}
</style>
</head>
<body>
<container>
    <span>Test passes if there is a filled green square below.</span></br>
    <item class="float-right"></item>
    <item class="float-left"></item> 
</container>
</body>
</html>
