Adjusting gutters like a pro in Sketch

4 min read
Joseph Angelo Todaro
  •  Aug 18, 2017
Link copied to clipboard

[Download the corresponding Sketch project file here.]

Whether you’re working with a grid system, or just laying out freeform content with gutters, making a little change can mean lots and lots of nudging. With the Group Resizing features of Sketch and a pinch of math, you can steer yourself clear of countless minutes (which add up to hours) of tedious nudging.

For those who prefer reading to watching, get the step by step below.

Let’s say we’ve got a grid with 10px gutters between each box. Then your creative director strolls by and says “Those gaps are 20px, right?”….

Before we hop on a train down to Nudge Town, let’s select all of these layers, and group them with Command + G. Then we’ll select every layer in the group. You’ll find a handy plugin to do this with a single shortcut on our awesomeSketch Plugin List here. With every layer selected, head over to the Inspector and turn on Fix Width and Fix Height.

Now, select the group itself and head back to the Inspector to make some magic happen. We’ll start with the horizontal spacing by clicking into the Width field.

Because the layers are “floating in place,” we can scale the group without scaling the layers, thereby targeting the gutters. Instead of modifying this number by hand, we’ll have Sketch do the math for us. At the end of the existing width value type “+” followed by the desired addition to each gutter (i.e. “+10” to add the 10 pixels we want), then an asterisk followed by the number of gutters (i.e. “*5” for 5 gutters). Hit return and you should have your perfectly uniform 20px gutters.

The entire string should look something like 650+10*5

Repeat for the height if you have some horizontal gutters and you’re done. Now that’s much more fun than nudging 36 layers or 12 rows and columns.

Looking for more Sketch tutorials?

How to override colors in Sketch

Creating infinitely scalable connection arrows in Sketch

What are you designing with Sketch? Tell us on Twitter: @InVisionApp.

Collaborate in real time on a digital whiteboard