mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibWeb: Implement very basic margin collapsing
We now collapse a block's top margin with the previous sibling's bottom margin so that the larger margin wins.
This commit is contained in:
parent
88673f3f85
commit
21b1f1653d
3 changed files with 25 additions and 1 deletions
16
Base/home/anon/www/margin-collapse-1.html
Normal file
16
Base/home/anon/www/margin-collapse-1.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<style>
|
||||
#foo {
|
||||
border: 1px solid red;
|
||||
margin: 25px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
#bar {
|
||||
border: 1px solid green;
|
||||
margin: 25px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id=foo>foo</div>
|
||||
<div id=bar>bar</div>
|
|
@ -28,6 +28,7 @@ span#ua {
|
|||
<p>Your user agent is: <b><span id="ua"></span></b></p>
|
||||
<p>Some small test pages:</p>
|
||||
<ul>
|
||||
<li><a href="margin-collapse-1.html">margin collapsing 1</a></li>
|
||||
<li><a href="position-absolute-from-edges.html">position: absolute, offset from edges</a></li>
|
||||
<li><a href="iframe.html">iframe</a></li>
|
||||
<li><a href="many-buggies.html">many buggies</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue