01Inconsistent spacing is invisible and everywhere
Ask someone why a screen feels unpolished and they'll rarely say "the padding is 14px here and 18px there." They'll say it feels cluttered, or cramped, or like the elements don't belong together. That reaction is almost always spacing, even when nobody names it as such.
Arbitrary pixel values (13px here, 22px there, whatever felt right in the moment) are the most common source of that feeling, because the eye reads spacing relationships even when it can't consciously measure them.
02Building a scale that removes the guessing
-
01
Pick a base unit and multiply
4px or 8px as a base, then a fixed scale: 4, 8, 12, 16, 24, 32, 48, 64. Every spacing decision becomes "which step," not "what number."
-
02
Related elements get less space than groups
A label and its input sit close (8px); two unrelated form sections sit further apart (32px+). The gap size itself communicates the relationship before anyone reads a word.
-
03
Never eyeball a "looks about right" gap
Every off-scale value is a future inconsistency. If none of the scale steps look right in a given spot, that's a sign the layout itself needs rethinking, not a signal to break the scale.
-
04
Component internal spacing is part of the system too
Button padding, card padding and input height need to sit on the same scale as page layout spacing, or components will visually clash with the grid around them.
-
05
Vertical rhythm needs the same discipline as horizontal
Heading-to-paragraph spacing, paragraph-to-paragraph spacing — these are read just as strongly as column gaps, and get overlooked just as often.
-
06
Encode the scale as tokens, not habit
space-1throughspace-8as design tokens (matching Tailwind's own spacing scale, for example) makes the system enforceable in code, not just a guideline designers remember.
03The test: squint at the screen
A useful trick: blur your eyes slightly, or squint, while looking at a layout. Grouping and hierarchy that only work when you read labels carefully will fall apart; grouping built on a real spacing scale holds up even when you can't read anything. If the squint test fails, it's a spacing problem before it's a color or typography problem. Fix that layer first.
04Off-scale spacing fails the build
In an Angular SCSS setup, the spacing scale lives in the abstracts layer as a space() function. Any value that isn't on the scale raises a Sass @error, so "looks about right" spacing can't compile.
Component styles then express relationships rather than pixels: a small step between a label and its input, a larger one between field groups.
@use 'sass:map';
$base: 4px;
$scale: (0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 6: 6, 8: 8, 12: 12, 16: 16);
@function space($step) {
@if not map.has-key($scale, $step) {
@error "space(#{$step}) is not on the spacing scale.";
}
@return map.get($scale, $step) * $base;
}
// form-field.component.scss
@use 'abstracts' as *;
:host { display: grid; gap: space(1); } // label ↔ input
.field-group + .field-group { margin-top: space(6); } // group ↔ group
The takeaway
A fixed spacing scale (a 4 or 8px base, multiplied out and encoded as tokens) turns "does this look right" into "which step on the scale," and gives grouping and hierarchy a foundation that holds up even at a squint. Most interfaces that "feel off" are a spacing problem wearing a color or typography costume.