Figma Support Forum

Button is not fitting the 8px grid

Hi everyone, I’m trying to make a button to fit the 8px grid with auto layout. It’s not fitting the grid. However, I’ve seen a couple of other buttons from community files that perfectly fit the grid. What could be the reason for this? Here’s an example of the button slightly extending away from the grid. This is inspite of enabling “Snap to Pixel Grid”.

You’ll want to make sure your line-height is a multiple of 8, and that the padding will make it equal a multiple of 8.



The width of the button will change if you have Hug-Contents selected. The only way I’m aware of to fix the width of the button on the 8pt grid is setting a fixed width of the auto layout.