-
-
Notifications
You must be signed in to change notification settings - Fork 679
Description
Currently, headings (H1, H2, H3) have equal spacing above and below them. In standard typography, headings should have more whitespace above than below, because a heading visually belongs to the paragraph that follows it — not the one before it.
This is a widely established typographic convention (see Butterick's Practical Typography, Google's Material Design type
guidelines, and most CMS/editor implementations like Notion, Google Docs, and WordPress).
Current behavior
All blocks get identical vertical spacing (padding: 3px 0 on .bn-block-content), and heading margins are reset to 0. There is no heading-specific spacing at all.
Expected behavior
Headings should have asymmetric vertical spacing — for example, roughly 2× the space above compared to below. This creates a clear visual grouping where the heading "attaches" to its following content.
Where to fix
In packages/core/src/editor/Block.css, add margin/padding rules for [data-content-type="heading"] blocks. Something like:
.bn-block-outer:has(> .bn-block > .bn-block-content[data-content-type="heading"]) {
margin-top: 1em;
margin-bottom: 0.3em;
} Or alternatively on the .bn-block-content[data-content-type="heading"] select directly.
This could also be scaled by heading level (H1 gets more spacing than H3).
