mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +00:00
LibWeb: Use correct reference for abspos elements with % height sizes
Absolutely positioned elements should have their percentage sizes resolved against the padding box of the containing block, not the content box. From CSS-POSITION-3 <https://www.w3.org/TR/css-position-3/#def-cb> "..the containing block is formed by the padding edge of the ancestor.."
This commit is contained in:
parent
357174d8fd
commit
c374541711
3 changed files with 20 additions and 2 deletions
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html><style>
|
||||
body {
|
||||
position: relative;
|
||||
padding-top: 30%;
|
||||
}
|
||||
.abspos {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
background: orange;
|
||||
}
|
||||
</style><body><div class="abspos">
|
Loading…
Add table
Add a link
Reference in a new issue