1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:57:35 +00:00

LibWeb: Use preferred flex item sizes as min/max-content contribution

When a flex item has a specific preferred size, that size should be its
contribution to the containers intrinsic sizes.

This fixes an issue on Patreon where the logo would cover the entire
viewport since the SVG had a large intrinsic size but the flex item
containing it had a small specified size in CSS.
This commit is contained in:
Andreas Kling 2022-11-05 11:38:28 +01:00
parent ea7ce76d20
commit 7809cc6557
3 changed files with 49 additions and 14 deletions

View file

@ -0,0 +1,22 @@
<!DOCTYPE html><html><head><style>
html {
background: white;
}
.flexbox {
display: flex;
background: pink;
}
svg {
background: orange;
height: 50px;
width: 50px;
}
</style></head><body class="flexbox"><svg
width="569px"
height="546px"
viewBox="0 0 569 546"
><circle
cx="362.589996"
cy="204.589996"
r="204.589996"
></circle></svg>