Site Tuner Install

Blog

How to edit spacing and padding on a live site, like you would in Figma

In Figma, the space between two layers is one number. On a web page it can come from four different places, which is why "just add 8 pixels there" so often lands in the wrong spot. Here is how spacing works in the browser, in design-tool terms.

Three kinds of space

  • Padding is space inside a layer, between its edge and its content. It is the same idea as padding on an auto layout frame.
  • Gap is the space between the children of a flex or grid layer. It is the "spacing between items" field in auto layout.
  • Margin is space outside a layer, pushing its neighbours away. Figma has no direct equivalent, and most spacing surprises come from here.

Why the number is hard to find

You see 24 pixels between a heading and a paragraph. That might be a bottom margin on the heading, a top margin on the paragraph, a gap on their parent, or two margins that overlapped and collapsed into one. Browser developer tools will tell you, but only after you click through the box model of three elements and read CSS you did not write.

The question a designer is asking is simpler: what is this space, and can I change it?

Working with the space itself

Site Tuner treats a space as something you can select. Move over padding or the room between two neighbours and it lights up pink with its value. Click it and it appears in the panel as the selected spacing, with a plain description of where it is set. Double-click and you can type a new value on the page. The arrow keys nudge by 1, or by 10 with Shift.

It picks the property for you. Between children of a flex or grid layer it changes the gap. Elsewhere it sets a margin on the later of the two elements. Either way, the hand-off to your agent names the property, the old value, the new one and the rule that set it.

Measuring without changing

Two habits from Figma carry over. Select two layers with Shift and click to see the distance between them in red. Or select one and hold Alt while you hover another to read the distance, the same redline you get in a design file.

One element or all of them

Before you change the padding on a card, decide what you mean. If every card should change, set "Apply to" to the card's class and all of them update together. If it is only this card, leave it on this element only. That choice is written into the instructions, so the agent either edits the shared rule or adds a one-off override, not a guess.

Check the small screen

Spacing that reads well at desktop width often needs to shrink on a phone. Switch the page to a phone size before you hand over. If the 48 pixels you just set looks too large there, say so in a pinned comment and the agent can add the breakpoint.