Closed meandillar closed 1 year ago
👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.
Reproduction: https://codesandbox.io/s/intelligent-bas-2w98s cc / @chloerice Could this be related to any of your empty state work? Or could your work be fixing this?
I'm also getting this issue with SVG images. There's seemingly no way to specify a width for the image.
As of Polaris 6 my SVG images disappeared from EmptyState
.
I'm injecting this CSS to work around the issue:
.Polaris-EmptyState__ImageContainer {
width: 24rem;
}
What's happening here:
0
width, and then grows to the width of its children.img
defaults to its own width, but an SVG img
defaults to its parent's width. This is 0
.0
.flex-basis: 50%
to give the image container width; but flex-basis
works along the flex axis, so when flex-direction
is a column, this controls height instead.cc/ @alex-page @kyledurand
I have sort of the same issue too. Somehow my margin-left
got -70%
Ended up injecting too.
.Polaris-EmptyState__Image {
margin-left: -0% !important;
}
Also getting this issue with an SVG in an EmptyState, will inject the css to workaround the issue but would be good to get a fix.
Hey folks, if anyone wants to make a PR to look into resolving this problem I would be happy to review it.
Just bumping this, also ran into it. When spinning up a new service via the services-db quick start, the default code makes use of an EmptyState
component with an svg, and its not displaying anything. Sample branch: empty-state-broken-demo
.
SVG's dont work (weather its a remote url or a local file), however other file types seem to work fine
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's design system and dev experience.
Issue summary
I am using an EmptyState component within a Card. When using an svg the image is 0 x 0 pixels meaning it isn't visible.
Expected behavior
Image should be visible.
Actual behavior
Image is 0 x 0 pixels. This is fixed by giving the wrapping container
Polaris-EmptyState__ImageContainer
a width, for example, of100%
Specifications