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

LibWeb: Use padding box of containing block to resolve % height size

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.."

Fixes crash on Acid2 test.
This commit is contained in:
Aliaksandr Kalenik 2023-06-18 19:18:49 +03:00 committed by Andreas Kling
parent 14ae0524e9
commit ca0c2339f4
5 changed files with 47 additions and 2 deletions

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<style type="text/css">
.container {
padding-top: 100px;
height: 500px;
background-color: cadetblue;
}
.hmm {
min-height: 50%;
background-color: pink;
border: 10px solid rebeccapurple
}
</style><div class="container"><div class="hmm">hello</div></div>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<style type="text/css">
.hmm {
min-height: 50%;
background-color: pink;
border: 10px solid rebeccapurple
}
</style><div class="hmm">hello</div>