Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with importing element with sprite image #177

Open
HiddeRpl opened this issue May 21, 2024 · 1 comment
Open

Problem with importing element with sprite image #177

HiddeRpl opened this issue May 21, 2024 · 1 comment
Assignees

Comments

@HiddeRpl
Copy link

HiddeRpl commented May 21, 2024

Describe the problem

Hello!
We are currently at importing our component from storybook to story-to-design and we approach the problem with importing component, where divs are styled with sprite img in png. Images are duplicated (background positions are ignored). When sprite is in svg there is no such a problem. The same - preview of bugged component looks great also.


Bug report identity: Please do not edit

Task path: XMGeK4rNlbbBUgXXZdz5/3jBx6hLh29U5I8fVwOya/14waqbtokjvab

@gluck gluck self-assigned this May 21, 2024
@gluck
Copy link
Member

gluck commented May 21, 2024

Hi @HiddeRpl

We do compute the tile position correctly, but figma ignores it because we used the TILE scale mode (only CROP supports image translation).
If you set background-repeat: no-repeat on your sprites you'll see that the position is correct.

We'll work on improving the logic where we choose between TILE & CROP, while it's a figma limitation that TILE doesn't support translation, I believe that in your case we should go with CROP as the image isn't actually close to repeating in any dimension.

Thanks for the report, I'll keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants