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

LibWeb: Resolve % top and bottom insets against containing block height

This makes cookie banner buttons show up on Linktree again. :^)

Regressed in fd37ad3a84
This commit is contained in:
Andreas Kling 2023-07-08 09:49:37 +02:00
parent fd37ad3a84
commit db5bde01dc
3 changed files with 36 additions and 2 deletions

View file

@ -0,0 +1,14 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x0 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 500x400 positioned [BFC] children: inline
BlockContainer <div.one> at (311,211) content-size 28.6875x17.46875 positioned [BFC] children: inline
line 0 width: 28.6875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [311,211 28.6875x17.46875]
"one"
TextNode <#text>
BlockContainer <div.two> at (330.5625,351.53125) content-size 28.4375x17.46875 positioned [BFC] children: inline
line 0 width: 28.4375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [330.5625,351.53125 28.4375x17.46875]
"two"
TextNode <#text>
TextNode <#text>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html><style>
* {
border: 1px solid black;
}
body {
position: absolute;
width: 500px;
height: 400px;
}
.one {
position: absolute;
top: 50%;
left: 60%;
}
.two {
position: absolute;
bottom: 10%;
right: 30%;
}
</style><body><div class=one>one</div><div class=two>two</div>