1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:08:10 +00:00

LibWeb: Avoid text-aligning content that is too long for its line box

Previously, we would always respect the `text-align` property, even if
the text being aligned was too long for its line box and would be
clipped. This led to seeing the clipped middle/end of strings when we
should instead always see the beginning of the text.
This commit is contained in:
FalseHonesty 2023-06-01 20:42:41 -04:00 committed by Andreas Kling
parent 54fb9477a4
commit de9604212f
3 changed files with 38 additions and 12 deletions

View file

@ -0,0 +1,13 @@
<!DOCTYPE html><style>
.outer {
margin-left: 10px;
width: 80px;
}
.text {
display: block;
text-align: center;
overflow: hidden;
white-space: nowrap;
}
</style><div class="outer"><span class="text">My super long message!