mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 09:22:30 +00:00
When generating line boxes, we place floats simultaneously with the other items on the same line. The CSS text spec requires us to trim the whitespace at the end of each line, but we only did so after laying out all the line boxes. This changes the way we calculate the current line box width for floats by subtracting the amount of pixels that the current trailing whitespace is using. Fixes #4050.
21 lines
372 B
HTML
21 lines
372 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.a {
|
|
background-color: red;
|
|
width: 100px;
|
|
}
|
|
.b {
|
|
background-color: green;
|
|
display: inline-block;
|
|
width: 50px;
|
|
}
|
|
.c {
|
|
background-color: blue;
|
|
float: right;
|
|
width: 50px;
|
|
}
|
|
</style>
|
|
<div class="a">
|
|
<div class="b">foo</div>
|
|
<div class="c">bar</div>
|
|
</div>
|