Przejdź do treści

Lekcja 13 · Layout and Grids

Spacing Systems and the Baseline Grid

Create a small spacing scale, apply it to cards and pages, and learn how a baseline grid keeps lines of text in step across columns in longer layouts.

Grids organize width. A spacing system organizes the gaps. Instead of choosing a new number every time, you pick from a short list. Your layout becomes more consistent, and decisions get faster.

For text, a baseline grid can go further and line up rows of type.

What you will learn

  • How to build a spacing scale
  • Where to use small, medium and large steps
  • What a baseline grid is
  • When a strict system is not needed

Build a spacing scale

Pick a base unit, then make a few steps from it. With a base of 8, a scale might be:

Step Size Typical use
XS 4 Tight pairs, such as an icon and its label
S 8 Items in one small group
M 16 Related blocks
L 32 Separate sections
XL 64 Major page areas

The 8-unit base is a popular choice in screen design, but nothing about it is magic. A base of 6 or a different set of steps can also work. What matters is that the steps are few, clearly different and used consistently.

Match the step to the relationship

Spacing shows how closely things are related. This is proximity with numbers:

  • closest relationship: smallest step
  • same section: medium step
  • new section: large step

Worked example: an event card

Gap Step
Card edge to content (padding) M, 16
Event title to date XS, 4
Date block to description M, 16
Description to button M, 16
Card to next card L, 32

The space between cards is larger than the space inside them. So the reader sees separate cards without needing heavy borders.

Inner space and outer space

Check padding inside a box before you adjust the gaps between boxes. Text that nearly touches a box edge looks squeezed. Large buttons usually need more padding at the sides than above and below. Judge it by eye as well, since letters have different shapes.

The baseline grid

The baseline is the line that most letters sit on. A baseline grid is a set of equally spaced horizontal lines. Body text sits on these lines.

If your body line spacing is 24 units, you can make a grid every 24 units. Then:

  • body text uses a 24-unit line height
  • larger headings use line heights that are multiples of 24, such as 48
  • space before and after blocks follows the same rhythm, using 24 or 12

The reward is that text in side-by-side columns lines up. In two-sided printed books and magazines, matching lines can also reduce visual noise.

flowchart LR
  A["Body line spacing: 24"] --> B["Baseline grid: every 24"]
  B --> C["Heading line height: 48"]
  B --> D["Block spacing: 24 or 12"]

One line spacing value can set a rhythm for the whole page.

When it is worth it

A strict baseline grid is most useful in long documents with columns. For a simple poster it is often unnecessary. Many web layouts keep a consistent spacing scale without locking every line to a grid, because screen text can reflow.

Spacing and flexible text

On screens, people may increase text size or change spacing for comfort. Do not lock text in fixed-height boxes, where it can be cut off. Let containers grow with their content.

Write your spacing scale at the top of your style sheet or project notes. When you are tempted to use 19, choose 16 or 24, and see whether the design improves.

Fixing a messy layout

  1. Measure the current gaps. You may find many nearly equal values, such as 14, 17 and 19.
  2. Map each to the nearest step in your scale.
  3. Increase the gaps between unrelated groups.
  4. Look again, and make optical adjustments where needed.

A worked repair with numbers

A sign-up form has these gaps: label to field 11, between one field and the next label 13, between two sections 21, and card padding 9.

The first two gaps are almost equal, so each label seems to float between fields. The sections are hard to see, and the card feels tight.

Gap Before After
Label to its field 11 4
Field to next label 13 16
Section to section 21 32
Card padding 9 16

Now each label clearly belongs to one field, and the two sections read as separate parts. Notice that we did not snap each number to the nearest step. We chose the step that matches the relationship. Nearest-value rounding is only a starting point. Test the form on a narrow screen and with larger text before you call it finished.

Document your choices

Next to each step in your scale, write when to use it, for example "4: label to its own field". A number alone does not tell a teammate much. A short rule makes the system easy to repeat, and it helps you notice when a new kind of gap really needs its own rule.

Common mistakes

  • Using many close values, such as 14, 15 and 17.
  • Making padding inside a box smaller than the line spacing of its text needs.
  • Fixing text boxes at one height, so enlarged text is cut off.
  • Following the numbers while ignoring what your eye sees.

Try it

Snap each messy gap to the nearest value in the scale 4, 8, 16, 32, 64.

Snap to the spacing scale

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the main goal of a spacing scale?

    A short list gives consistency and faster decisions.
  2. 2. On an event card, which gap should usually be larger?

    Bigger space between groups shows they are separate.
  3. 3. What is a baseline grid?

    It creates a steady vertical rhythm for type.
  4. 4. Why avoid fixed-height text boxes on screens?

    Containers should grow when text grows.

Summary

  • A spacing system uses a few clear steps.
  • Choose steps by how closely items are related.
  • Check padding inside boxes and space between them.
  • A baseline grid aligns text rows and suits long layouts.
  • Let text containers grow on screens.

Next: Reading Patterns and Focal Flow

Śledź swoje postępy

Załóż darmowe konto, aby odhaczać lekcje i wracać do miejsca, w którym skończyłeś, na dowolnym urządzeniu.