mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:18:12 +00:00

When sizing under a max-content constraint, we allow flex lines to have an infinite amount of "remaining space", but we shouldn't let infinity leak into the geometry of items. So treat it as zero in arithmetic. This fixes an issue where inline SVGs with natural aspect ratio (from viewBox) but no natural width or height could get an infinite size as flex items.
10 lines
No EOL
240 B
HTML
10 lines
No EOL
240 B
HTML
<!DOCTYPE html><style>
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
svg {
|
|
flex-grow: 1;
|
|
}
|
|
</style><body><svg viewBox="0 0 24 24"><rect x=0 y=0 width=12 height=12></svg> |