mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
LibWeb: Margin top collapsing between parent and first child
Implement collapsing of a box margin-top and first in-flow child margin-top by saving function that updates y position of containing block inside BlockMarginState and then for every child until "non-collapsed through" child is reached y position of containing block is updated by calling update_box_waiting_fox_final_y_position_callback.
This commit is contained in:
parent
fe8304d5de
commit
7088a87f49
3 changed files with 70 additions and 3 deletions
22
Base/res/html/misc/margin-collapse-3.html
Normal file
22
Base/res/html/misc/margin-collapse-3.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<style>
|
||||
#foo {
|
||||
background-color: red;
|
||||
margin-bottom: 25px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
#bar {
|
||||
background-color: green;
|
||||
margin-top: 100px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
#baz {
|
||||
background-color: blue;
|
||||
width: 100px;
|
||||
margin-top: -50px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id=foo></div>
|
||||
<div id=bar><div id=baz></div></div>
|
Loading…
Add table
Add a link
Reference in a new issue