mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:37:35 +00:00
LibWeb: Make sure that margins don't collapse across a nested BFC
In order to fix this, I also had to reorganize the code so that we create an independent formatting context even for block-level boxes that don't have any children. This accidentally improves a table layout test as well (for empty tables).
This commit is contained in:
parent
9ce7681ff2
commit
411b28fc59
4 changed files with 62 additions and 31 deletions
|
@ -0,0 +1,20 @@
|
|||
<!doctype html><style>
|
||||
* {
|
||||
padding: 0;
|
||||
}
|
||||
html {
|
||||
background: white;
|
||||
}
|
||||
body {
|
||||
background: pink;
|
||||
}
|
||||
.not-bfc {
|
||||
margin-top: 30px;
|
||||
height: 20px;
|
||||
background: orange;
|
||||
}
|
||||
.bfc {
|
||||
margin-top: 30px;
|
||||
display: flow-root;
|
||||
}
|
||||
</style><div class="not-bfc"></div><div class=bfc></div><div class="not-bfc"></div>
|
Loading…
Add table
Add a link
Reference in a new issue