mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 17:15:06 +00:00

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.
22 lines
366 B
HTML
22 lines
366 B
HTML
<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>
|