1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:17:44 +00:00

LibWeb: Make text justification work between floats

While inline content between floating elements was broken correctly,
text justification was still using the original amount of available
space (without accounting for floats) when justifying fragments.
This commit is contained in:
Andreas Kling 2023-05-16 09:51:33 +02:00
parent bab6796099
commit e938860126
5 changed files with 237 additions and 1 deletions

View file

@ -0,0 +1,25 @@
<style>
* {
font: 20px SerenitySans;
border: 1px solid black;
}
body {
margin-left: 250px;
text-align: justify;
}
.left {
float: left;
background: pink;
width: 300px;
height: 200px;
}
.right {
float: right;
background: wheat;
width: 300px;
height: 200px;
}
</style>
<div class=left></div>
<div class=right></div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a placerat mauris, ut elementum mi. Morbi ut vehicula ipsum, eget placerat augue. Integer rutrum nisi eget dui dictum, eu accumsan enim tristique. Ut lobortis lorem eget est vulputate egestas. Integer laoreet lacinia ante sodales lobortis. Donec a tincidunt ante. Phasellus a arcu tortor.