mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:57:47 +00:00
LibWeb: Fix clearance to update y offset within current block
If a box has clearance and margin bottom of preceding box is greater than static y of the box then it should also affect y offset in current block container so subsequent boxes will get correct y position too.
This commit is contained in:
parent
0cd63f851e
commit
2ed5415750
3 changed files with 41 additions and 0 deletions
23
Tests/LibWeb/Layout/input/clearfix.html
Normal file
23
Tests/LibWeb/Layout/input/clearfix.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<style>
|
||||
.clearfix {
|
||||
clear: both;
|
||||
}
|
||||
.square {
|
||||
float: left;
|
||||
width: 49px;
|
||||
height: 49px;
|
||||
}
|
||||
.white {
|
||||
background-color: salmon;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.black {
|
||||
background-color: slateblue;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<div class="square white"></div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="square black"></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue