1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00
serenity/Tests/LibWeb/Layout/input/block-and-inline/block-level-floating-box-with-clearance.html
Aliaksandr Kalenik 81ddad3fcf LibWeb: Allow block level boxes to be floated and have clearance
Before, we completely ignored clearance for block-level boxes if they
were floated. This was incorrect because it is valid for a block-level
box to be floated and still have clearance. However, unlike clearance
on normal flow boxes, clearance on floating boxes does not affect the
y-position of subsequent normal flow boxes. Instead, it pushes the
box's position to the very beginning of an edge.

Work towards https://github.com/SerenityOS/serenity/issues/21023
2023-09-12 12:11:53 +02:00

27 lines
No EOL
569 B
HTML

<!DOCTYPE html><style>
* { outline: 1px solid black; }
body { width: 600px; }
div {
width: 100px;
height: 100px;
}
#top {
float: left;
background: green;
}
#left {
float: left;
background: pink;
clear: both;
}
#right {
float: left;
background: orange;
}
.normal {
width: 300px;
height: 300px;
background-color: gray;
border: 10px solid sandybrown;
}
</style><body><div class="normal"></div><div id="top">top</div><div id="left">left</div><div id="right">right</div><div class="normal"></div><div class="normal"></div>