Skip to main content

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


Polina3

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?

21 replies

Gayani_S
Figmate
  • Community Support
  • 1916 replies
  • January 29, 2024

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?


Polina3
  • Author
  • 4 replies
  • January 30, 2024

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?


Gayani_S
Figmate
  • Community Support
  • 1916 replies
  • January 30, 2024

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.


Gayani_S
Figmate
  • Community Support
  • 1916 replies
  • January 31, 2024

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.


Polina3
  • Author
  • 4 replies
  • January 31, 2024

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.


Gayani_S
Figmate
  • Community Support
  • 1916 replies
  • February 5, 2024

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!


Gayani_S
Figmate
  • Community Support
  • 1916 replies
  • February 6, 2024

@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.


Polina3
  • Author
  • 4 replies
  • February 7, 2024

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!


Gayani_S
Figmate
  • Community Support
  • 1916 replies
  • February 7, 2024

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

Thanks,
Gayani.


Miklos_Philips

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.


Cori_Leste2

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).


Polina3
  • Author
  • 4 replies
  • March 25, 2024

@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!


Olya2
  • 1 reply
  • March 29, 2024

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


Julius_Klaus

+1, i need an option where Figma forces frames to whole pixel values, as exported assets with fractional positioning will have a thin white edge and will not be the expected dimensions (+/-1 pixel)


Fritz_R
  • 1 reply
  • July 11, 2024

I am also experiencing this issue and its super frustrating to deal with.


Cody_Petruk

Our team is having a terrible time with exported assets having a thin white edge. We all have Snap to Pixel Grid turned on and we’re still getting all kinda of fractional positions.

There’s a “Snap to Pixel” plugin that removes unwanted decimals but we shouldn’t be having to run this across everything. Can we PLEASE get a “Make All Frames Round Values” preference?


S.T
  • New Participant
  • 12 replies
  • November 15, 2024

I am coming form sketch which has a Round to Pixel action in the task bar. This works regardless grid or not. I am running into the same issue and find myself having to so it by hand which is time consuming.


Elespacio_Comunicacion_Visual

Hi,
We are also struggling with this.
Besides the of pasting from another file, elements also don’t snap to grid when pasted components or elements are scaled up or down. We know that scaling components is an unusual user case, but it’s part of our workflow with a specific client. Having to go over all file layers to fix positions and dimensions every single time sucks the life of us. We’d rather let Figma snap everything automatically and we manually deal with the few exceptions when something doesn’t look right.


wolfr
  • 20 replies
  • December 10, 2024

If Figma would copy paste sources with fractions into other positions when copying from file to file, it could potentially mess up the integrity of the design, so I understand Figma’s decision to not do this.

Sketch’s “Round to pixel” option on the toolbar was mentioned before.

I wanted to get opinions from people about the Snap to Pixel plugin. Do you use this plugin to fix frames that sit on fractional values, or do you fix it manually using the numbers in the right side panel? Or do you have another solution?

https://www.figma.com/community/plugin/1219661857469864621/snap-to-pixel


Leila
  • New Member
  • 1 reply
  • January 21, 2025

I struggle with the same issue.. 


MiloW
  • Active Member
  • 46 replies
  • January 24, 2025

Misalignation or whatever you can call it, can be avoided if there were additional options like “snap towards nearest” or something like that.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings