mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibWeb: Honor negative margins on atomic inlines
Sizing already worked correctly, but before this change, we were too aggressive with inserting line breaks when negative margins would still an atomic inline to fit on the line.
This commit is contained in:
parent
3ae29fdeec
commit
7abb182fa3
5 changed files with 80 additions and 1 deletions
|
@ -0,0 +1,23 @@
|
|||
<!doctype html><style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body {
|
||||
width: max-content;
|
||||
border: 5px solid black;
|
||||
}
|
||||
.foo {
|
||||
display: inline-block;
|
||||
background: orange;
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
}
|
||||
.bar {
|
||||
display: inline-block;
|
||||
background: magenta;
|
||||
margin-left: -50px;
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
}
|
||||
</style><body><div class="foo"></div><div class="bar"></div>
|
Loading…
Add table
Add a link
Reference in a new issue