Skip to content

Headings should have more space above than below (typographic convention) #2414

@rubzie

Description

@rubzie

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).

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:P2Medium: Noticeable but non-blocking issues.sponsor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions