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

LibWeb: Compute content width before static position for abspos elements

In some scenarios, correctly computing the static position may depend on
the content width having been calculated beforehand.
This commit is contained in:
implicitfield 2024-03-02 21:53:25 +04:00 committed by Andreas Kling
parent 18fe86adc3
commit e3b1d4a141
3 changed files with 72 additions and 4 deletions

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<style>
#containing-block {
width: 200px;
height: 100px;
background: red;
}
#inner-flex {
display: flex;
justify-content: center;
}
span {
display: block;
width: 50px;
}
</style>
<div id="containing-block">
<div id="inner-flex">
<div style="position: absolute; height: 100px; background: green;">
<span></span>
</div>
</div>
</div>