mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02: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.
27 lines
335 B
HTML
27 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>
|