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

LibWeb: Don't offset abspos children of flex container by padding twice

We were incorrectly offsetting the static position of abspos children of
flex containers by the padding twice. This was a misguided attempt to
adjust to the abspos containing block being the padding box, not the
content box.

Fixes #21344.
This commit is contained in:
Andreas Kling 2023-10-08 08:23:27 +02:00
parent a86531809e
commit 3250a424f0
3 changed files with 37 additions and 8 deletions

View file

@ -0,0 +1,17 @@
<!DOCTYPE html><html><head><style>
#flex-container {
display: flex;
padding: 10px;
}
#absolute {
position: absolute;
}
#orange {
background-color: orange;
width: 50px;
height: 50px;
}
#red {
background-color: red;
}
</style></head><body><div id="flex-container"><div id="absolute"><div id="orange"></div></div><div id="red">x