mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
If a block with inline children ends with a line break clearing any floats, we not only need to take the introduced clearance into account for the next line box, but the containing block needs to set the correct height as well. Since the spec calls for using the last line box' bottom as the resolved height (if treated as auto), we now correctly apply the clearance to the previous line box' bottom coordinate. Fixes #4058.
26 lines
335 B
HTML
26 lines
335 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.a {
|
|
background: red;
|
|
}
|
|
.b {
|
|
background: green;
|
|
float: right;
|
|
height: 200px;
|
|
width: 500px;
|
|
}
|
|
.c {
|
|
clear: right;
|
|
}
|
|
.d {
|
|
background: blue;
|
|
height: 200px;
|
|
width: 500px;
|
|
}
|
|
</style>
|
|
<div class="a">
|
|
<div class="b"></div>
|
|
foo
|
|
<br class="c">
|
|
</div>
|
|
<div class="d"></div>
|