mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Previously, a float with `padding-top` would overlap a preceding float instead of being placed beside it. The vertical overlap check was comparing the new float's content box Y,which includes the padding offset, against preceding floats' margin box rects, causing the check to incorrectly conclude the floats do not overlap.
19 lines
265 B
HTML
19 lines
265 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.a {
|
|
float: left;
|
|
width: 100px;
|
|
height: 20px;
|
|
background: green;
|
|
}
|
|
.b {
|
|
float: left;
|
|
width: 100px;
|
|
height: 10px;
|
|
padding-top: 40px;
|
|
background: blue;
|
|
}
|
|
</style>
|
|
<div class="a"></div>
|
|
<div class="b"></div>
|