Geometry & layout

Spacing Scale Generator

Choose how far text sits from a card’s edges and how much space separates its lines of content. Try the sizes, then reuse them in your design.

Adjust the spacing in a card

Start by changing the distance between the title and description. Look at which space grows in the card.

Weekly design meetup

Friday, 14:00 · Design studio

Padding · 16 pxText gap · 8 px

Use these values in your card

In Figma, select the title and description. Press Shift + A to add Auto Layout and choose the vertical direction. Set Gap to 8 px and Padding on all four sides to 16 px. Reuse those values on similar cards.

How are the spacing choices generated?

A spacing scale is a list of distances to reuse throughout a design. Your list starts at 4, 8, 12 px. The card lets you try the first four sizes.

Progression

Each step adds the base value.

1 rem equals the root font size.

Spacing scale

Code namepxrem
space-140.25
space-280.5
space-3120.75
space-4161
space-5201.25
space-6241.5
Get the code for your website

Add the CSS to your stylesheet. Give the element containing your title and description the card class.

:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
}

.card {
  display: grid;
  padding: var(--space-4);
  gap: var(--space-2);
}