Figma Support Forum

Auto-layout (fill container) should respect snap to pixel grid

For example, if I have 3 horizontal child containers with “Fill Container” constraint, they will divide their width by 1/3 pixels (Width: 16.33px) if inside an odd pixel number parent container. So now any element inside that child container is not able to be spaced according to it’s container unless manually typing sub-pixel x-axis placement. Very arduous and tedious workaround.

I’m not sure there’s an elegant solution to this outside of simply making one of the child containers 1 less pixel than the others. Does anyone else struggle with this?

EDIT: After further testing, I’ve realized that layout grids currently work in this way and auto-layout does not. This causes misalignment if using both of these methods in a frame (auto-layout modal within a parent layout grid frame)

3 Likes

Totally agree! It happens with me all the time

It would be great. For now, it’s kind of messy. :slightly_frowning_face: