Ollie Theme Academy

Implementing Layout Settings

Implementing block spacing – A

Block spacing solves the inconsistent margin problem that comes from HTML elements having different browser-default spacing. Without block spacing, you get irregular gaps and potential overflow issues between blocks.

WordPress enables block spacing by default, creating uniform spacing between all blocks using CSS margin techniques. You can see this as “margin-block-start” applied to blocks in the browser inspector.

To customize the spacing value, don’t use settings – use “styles > spacing > blockGap” in theme.json. This accepts any valid CSS value including design tokens from your spacing scale.

The result is consistent spacing between blocks on both frontend and backend, eliminating browser inconsistencies and giving you a stable foundation for your block theme’s visual rhythm.

Back to: Ollie Theme Academy > Implementing Layout Settings