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:
parent
18fe86adc3
commit
e3b1d4a141
3 changed files with 72 additions and 4 deletions
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue