Layout grids, I can't seem to utilize them

I often use layout grids in my designs. I switched to Sketch for various reasons however I can’t seem to get the hang of how layout grids work here.

When I use layout grids and fit elements from the design kit accordingly to the grid. I expect to have spaces in between same as the gutter value I have set. However it is always one or two pixels of despite visually fitting the grid and when I make pixel corrections it is visually and mathematically wrong.

On the same vein nothing ever really fits on the layout grid with ease, I have to check if everything is aligned one by one, losing the point of using layout grids as my guide.

Does anyone has suggestions improving these problem areas? It would immensely improve my sketch experience…

1 Like

Hi Öykü :wave: Could you share the specs of one of the grids you’re trying to use? That would help a lot reviewing the example and providing better guidance, thanks!

1 Like

Often times the combination of layout width, number of columns, and gutter size does not evenly split. So what sketch does is it will slightly adjust either one of the gutters or one of the column widths so that it will fit as best as possible.

You either just have to just accept it, or you need to make sure that your combination of layout width, column number, and gutter with will actually end up evenly dividing.

There are a lot of tools out there to define grids, but one I use a lot because of its simplicity is this: https://gridulator.com/

You can use it to get a quick check to see if your columns will result in equal width gutters or not.

1 Like

Hey guys,

These are great insights however what I use is often a pretty standard gridding on 1920px width with 16px gutters and 32px margins on both sides. I still get similar issues.

In this example the coloumn is 140 px and lets say i try to fit a 140 px field in there, then the field goes beyond the coloumn and if I fit inside the visual coloumn, the specs and exports are incorrect.

I am suspecting now that I dove deeper could be borders drawn with “outside” selected are messing with the calculations. However since it is a part of Design System language I cannot ditch this feature on my fields.

Ahhh yes! “Outside” borders are not included in the measurements, it only uses the fills to measure distance between elements. Actually I think all border types are ignored.

So that would definitely be what is causing your issue.

There’s no way around that though that I am aware of.

1 Like