Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-contain/contain-inline-size-bfc-floats-002.html
<!doctype html> <title>CSS Containment Test: inline-size of fit-content bfc constrained by floats, not affected by height</title> <link rel="help" href="https://drafts.csswg.org/css-contain-3/#containment-inline-size"> <link rel="match" href="contain-inline-size-bfc-floats-002-ref.html"> <style> .float { float: left; background-color: blue; } .right { float: right; } #outer { width: 400px; } #float1 { width: 200px; height: 100px; } #float2 { width: 250px; height: 100px; } #float3 { width: 300px; height: 100px; } #contain { contain: inline-size; display: flow-root; width: fit-content; } #orange { display: inline-block; width: 300px; height: 20px; background: orange; vertical-align: top; } </style> <p>You should see a wide orange rectangle to the left of the first float, overlapping the float.</p> <div id="outer"> <div id="float1" class="float right"></div> <div id="float2" class="float left"></div> <div id="float3" class="float right"></div> <div id="contain"> <span id="orange"></span> </div> </div>
/css/css-contain/contain-inline-size-bfc-floats-002-ref.html
<!doctype html> <title>CSS Test Reference</title> <p>You should see a wide orange rectangle to the left of the first float, overlapping the float.</p> <div style="width:400px;position:relative"> <div style="float:right;width:200px;height:100px;background:blue"></div> <div style="float:left;width:250px;height:100px;background:blue"></div> <div style="float:right;width:300px;height:100px;background:blue"></div> <div style="position:absolute;left:0;top:0;width:300px;height:20px;background-color:orange"></div> </div>