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

LibWeb: Fully resolve min- and max-sizes for flex items

We do this by piggybacking on FormattingContext helpers instead of
reinventing the wheel in FlexFormattingContext.

This fixes an issue where `min-width: fit-content` (and other
layout-dependent values) were treated as 0 on flex items.

This makes the cookie banners look okay on https://microsoft.com/ :^)
This commit is contained in:
Andreas Kling 2023-07-17 07:54:15 +02:00
parent 5d94bb4fcc
commit 8dd489da61
4 changed files with 102 additions and 75 deletions

View file

@ -0,0 +1,24 @@
<!DOCTYPE html><style>
* {
border: 1px solid black;
}
body {
display: flex;
width: 500px;
}
.big {
width: 400px;
height: 50px;
background: pink;
}
.buttons {
min-width: fit-content;
background: orange;
}
.button {
display: inline-block;
border: 1px solid black;
}
</style><body>
<div class="big"></div>
<div class="buttons"><div class="button">Accept</div><div class="button">Reject</div>