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

LibWeb: Take box-sizing into account when sizing replaced elements

This fixes an issue where images with padding and/or border did not have
their size adjusted for `border-box`, thereby becoming larger than
intended by the author.
This commit is contained in:
Andreas Kling 2023-06-04 16:01:30 +02:00
parent 9531abcb1a
commit c197fb4037
3 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,13 @@
<!doctype html><style>
img {
padding: 20px;
box-sizing: border-box;
border: 1px solid black;
}
.with-height {
height: 100px;
}
.with-width {
width: 100px;
}
</style><img class="with-height" src="120.png"><img class="with-width" src="120.png">