LibWeb: Resolve flex item percentages against used flex container sizes

Once we've resolved the used flex item width & height, we should allow
percentage flex item sizes to resolve against them instead of forcing
flex items to always treat percentages as auto while doing intrinsic
sizing layout.

Regressed in 8dd489da61.
This commit is contained in:
Andreas Kling 2023-07-17 21:19:33 +02:00
commit ac124fbaae
Notes: sideshowbarker 2024-07-17 17:40:13 +09:00
6 changed files with 126 additions and 56 deletions

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<style>
* {
border: 1px solid black;
background: none;
color: black;
}
.flex {
display: flex;
flex-direction: column;
background: pink;
height: 100px;
}
.hmm {
max-width: 100%;
width: 50px;
background: orange;
}
body {
width: max-content;
background: white;
}
</style>
<body><div class="flex"><div class="hmm">Hello</div>