Enabling “Snap to Pixel” instantly modifies the fractional coordinates of the frames in the file

Hi! Can somebody explain why with “snap to pixel grid” function on in Figma, the coordinates of files are still can be fractional? It fixes when you move them, but the question is still here why it is happening? And maybe there are some ways to prevent this or fix all frames coordinates in file altogether?

3 Likes

Hey Polina, thank you for reaching out! When you enable this functionality Figma will align objects to the underlying grid when placing or moving them. This can help to prevent mis-aligned pixel errors when exporting elements. More info here: https://help.figma.com/hc/en-us/articles/360041065034-Adjust-your-zoom-and-view-options#pixel-grid.

Could you show me at what times coordinated are still fractional? Could you share a brief video recording of this issue so that I have a better understanding of which actions you’re taking?

Thank you for answering!

For a faster answer, I share a screenshot of the situation. The new Figma file is created with the Snap to pixel grid function switched on, during work I need to copy some of the frames and place them in my own Figma file from another ones, so when I do it this frame might still have fractional coordinates, even when it is moving from file that was snapped to pixel grid too. I can move this one frame in my file to get rid of the problem with coordinates, but there are many frames I need to work with and it gets difficult to control all of them and not to miss any little frame during exporting a lot of resized banners.

To sum up, Figma file has snap to pixel grid, but it still can paste a copied frames with fractional coordinates inside. Can I fix it somehow?

Got it @Polina3, I can totally understand your frustration. I’ve shared your feedback internally and asked for a workaround here. I’ll give you an update soon! Appreciate your patience.

1 Like

Apologies @Polina3 for asking you to clarify your issue again. I’ve raised this with an engineer and got the response that the behavior regarding pasting from fractional spaces into pixel grid spaces is intentional. We preserve the coordinates instead of changing them.

However this could be a bug though if the coordinates of that layer are not fractional.

so when I do it this frame might still have fractional coordinates, even when it is moving from file that was snapped to pixel grid too

Could you confirm me again if you’re experiencing this? I would appreciate if you can share a screen recording so that I can share this internally and investigate further.

No problem, @Gayani_S! Here is a screen recording of the situation I struggle with.
Copied frames are saving their fractional coordinates indeed, but it becomes a problem further, because while working with big massive of files to miss one with fractionals is so easy. How can I fix them without moving each of them in file?

And the main question is that why I am pasting fractional frames from snapped to snapped spaces? All files have this function switched on.

Hey, apologies for the delayed response! So this looks like it’s an intended behaviour, I was able to reproduce this on my end. However, I want to double check this internally to see if there are any workarounds to copy & paste the frames without moving them. I’ll update you soon. Appreciate your patience!

1 Like

@Polina3 I got the confirmation this is intended and unfortunately there are no workarounds at this moment. However, I am able to change the category of this post to “Share an Idea”. I can change the title to: Enabling “Snap to Pixel” instantly modifies the fractional coordinates of the frames in the file.

This helps us roadmap future updates. Community members who would like to see your suggestion implemented can vote on it. Let me know if you approve this as well.

I am totally agree with your suggestion to change category of my question, hope that other users will help me to promote this idea as a new function update!
Thank you, @Gayani_S, for all of your efforts to solve my problem!

1 Like

No worries at all @Polina3, happy to help! I’ve changed the category now, feel free to upvote this post.

Thanks,
Gayani.

I’m struggling with the same issue and it’s really annoying. I hope there’s a fix for this soon like some keyboard trick where I can hold down the option key to make sure the paste command pastes the content snapping to a pixel grid, not fractional XY coordinates which screws up everything inside the frame as all elements then have fractional measurements in the XY coordinates and spacing things out is a giant pain from then on.

2 Likes

Also have struggle with this - we’re always copy > pasting things and they get further and further bested into auto-layouts which I suspect also ends up fractionalizing pixels, making it impossible to undo one layer at a time. Figma should create an option to auto-snap all layers to full pixels, allow user to exclude things like icons, and show a window that explains which layers were not able to be changed to full pixels (but still move all the eligible layers).

1 Like

@Cori_Leste2 @Miklos_Philips thanks for your support! We are in the same boat, so I’ll appreciate if you promote this topic so we can get more votes to fix this annoying problem finally!

I’m also have issue with this and hope the solution will find very soon!

1 Like