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:
parent
54fb9477a4
commit
de9604212f
3 changed files with 38 additions and 12 deletions
13
Tests/LibWeb/Layout/input/text-align-overflow.html
Normal file
13
Tests/LibWeb/Layout/input/text-align-overflow.html
Normal 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!
|
Loading…
Add table
Add a link
Reference in a new issue