mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
LibWeb: Account for margin and padding of aligned abspos flex items
This patch also makes FlexFormattingContext::calculate_static_position use computed values for margins and borders, since this function may be called before the box's state has been finalized.
This commit is contained in:
parent
e3b1d4a141
commit
3888a91c5b
4 changed files with 66 additions and 22 deletions
23
Tests/LibWeb/Layout/input/abspos-flex-margin-limits-1.html
Normal file
23
Tests/LibWeb/Layout/input/abspos-flex-margin-limits-1.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.container {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
display: flex;
|
||||
align-items: end;
|
||||
}
|
||||
.bottom-left {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-top: 500px;
|
||||
background: green;
|
||||
border: 5px solid black;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div class="bottom-left"></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue