ladybird/Tests/LibWeb/Layout/input/block-and-inline/float-clear-right-should-not-affect-inline-left.html
Jelle Raaijmakers 79352ad725 LibWeb: Remove application of vertical float clearance to BFC Y offset
In 15103d172c we applied any remaining vertical float clearance to the
BFC's current Y offset for the next block to layout, because a `<br
style="clear: left">` could introduce clearance that would otherwise be
ignored. However, a `<div>` that floats _and_ clears `right` also
introduces this clearance and it is obvious that this should not push
down any subsequent blocks to layout in the current BFC.

Turns out, we don't need this change anymore. Some other later change
also fixed the underlying issue, and by getting rid of the original fix
we can now render https://en.wikipedia.org/wiki/SerenityOS correctly
again.

Fixes #4418.
2025-04-23 13:24:58 +02:00

22 lines
528 B
HTML

<!DOCTYPE html>
<style>
html {
font-family: sans-serif;
width: 650px;
}
.a {
background: rgba(0, 255, 0, 0.6);
clear: right;
float: right;
height: 225px;
width: 300px;
}
.b {
background: rgba(255, 0, 0, 0.6);
height: 300px;
}
</style>
<div class="a"></div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="a"></div>
<div class="b"></div>