1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

LibWeb: Support flex items with calc() main size containing percentages

If a flex item's main size is a CSS calc() value that resolves to a
length and contains a percentage, we can only resolve it when we have
the corresponding reference size for the containing block.
This commit is contained in:
Andreas Kling 2023-06-02 15:34:26 +02:00
parent d6c3cbd958
commit 06617a982e
3 changed files with 38 additions and 3 deletions

View file

@ -0,0 +1,17 @@
<!doctype html><style>
html {
background: white;
}
body {
background: pink;
display: flex;
}
.orange {
background: orange;
display: flex;
}
.lime {
background: lime;
width: calc(50% - 10px);
}
</style><body class=pink><div class=orange><div class=lime>This is a bunch of text