mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-07 01:21:57 +00:00
In calculating the base size of a flex item, we have a piece of ad-hoc code that deals with an item that does have an instrinsic aspect ratio, but not a cross size to resolve that ratio against. In determining the actual flex item size however, we also take into account the minimum content width and height, which assumes the box' intrinsic width or height when available. This would break having an image as a flex item, which gets stretched to its maximum size within the flex container instead of the flex item being shrunk to the instrinsic size of the image. Fix this by only stretching flex items that do not have an instrinsic width nor height set.
2 lines
185 B
HTML
2 lines
185 B
HTML
<div style="display:flex">
|
|
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII">
|