1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00
serenity/Tests/LibWeb/Layout/input/block-and-inline/block-with-negative-margin-and-no-intruding-floats.html
Andreas Kling 89ba00304c LibWeb: Account for negative margins when calculating float intrusion
If a box has a negative margin-left, it may have a negative effective
offset within its parent BFC root coordinate system.

We can account for this when calculating the amount of left-side float
intrusion by flooring the X offset at 0.
2023-06-04 18:14:12 +02:00

15 lines
308 B
HTML

<!doctype html><style>
* { border: 1px solid black; }
html { background: white; }
body {
position: relative;
left: 100px;
background: pink;
width: 300px;
}
div {
margin-left: -50px;
background: orange;
width: 200px;
}
</style><body><div>there are no floats intruding on this div