Replies: 1 comment 1 reply
-
Hi! Constrained is about the width of the container, you're talking about the height here. This is working as expected as the image has the property |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am having trouble getting a
<StaticImage />
div to uselayout: "constrained"
properly. The docs sayIf the screen or container size is less than the width of the image, it scales down to fit, maintaining its aspect ratio.
, however when placing my image in a CSS grid layout it is not obeying the sizes of the parent containers, instead loading the image at full height.Steps to reproduce
Here is my minimal reproduction. It has instructions in the readme, but they are basically to just run
yarn
,yarn develop
, and then go tolocalhost:8000
and see the image.Expected result
the
<StaticImage />
component should inherit its height from its parent divsActual result
the
<StaticImage />
loads at full sizeEnvironment
Beta Was this translation helpful? Give feedback.
All reactions