Open jduff opened 1 year ago
Thanks for the report, @jduff . We're adding it to our backlog for prioritization.
Hi @ryan-ludwig - do you have any update on this issue?
It appears that I have the same experience - maxInlineSize seems to work exactly as I'd expect, but like @jduff I find that no combination of maxBlockSize
applies any change to the imagery.
When I apply maxInlineSize, I get CSS applied to the component which adjusts the behaviour as I'd expect. But, if I use maxBlockSize I can't see any CSS even applied that would influence the size.
Hey @edhgoose, thanks for the info. We've got it triaged but haven't started work on it yet.
Please list the package(s) involved in the issue, and include the version you are using
checkout-ui-extensions
Describe the bug
When using an image component with
fit='contain'
the image should be contained within the container.Steps to reproduce the behavior:
Image
with fit contain inside anInlineLayout
with fixed sizes. ex (using htm templates):Expected behavior
The image should be resized to the height of the container instead of overflowing out of it.
Screenshots
Additional context
Constraining the width works fine, I think this is because
max-width: 100%
is added to the image. Addingmax-height: 100%
when usingfit='contain'
should fix this issue.I'm open to other solutions here, but no combination of
InlineLayout
/BlockLayout
/View
with variousmaxInlineSize
ormaxBlockSize
have worked for me to constrain the height of the image. Another solution would be addingmaxWidth
andmaxHeight
properties to theImage
component as well.