Home▸Articles▸Computer Science

Line Height Guidelines

Maintaining appropriate line heights is essential for creating readable and visually appealing text across all screen sizes.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

Define line-height tokens that keep text readable across headings, body copy

Use generous line heights for body and tighter for headings. Maintain rhythm across breakpoints and avoid cramped lines in long-form content.

Recommended Line Heights: Body (1.5 - 2.0), Headings (1.2 - 1.4)

Responsive Adjustments

On mobile, increase body line-height to ~1.7–1.75 to aid readability. Keep heading line-heights stable to preserve hierarchy.

Use clamp() where helpful; Avoid line-height < 1.2 for any text.

live demo · related simulation● LIVE

Do not override line-height per component unless necessary; rely on to

For multi-line buttons or badges, keep line-height ≤1.4 to reduce vertical bloat.

Ensure user-specified line-height scaling does not break layouts. Keep sufficient spacing between lines and paragraphs (paragraph margin-bottom ≥ 0.5em).

Frequently asked questions

What are the recommended CSS variables for line heights?

The design system utilizes CSS variables: --line-height-body:1.65; and --line-height-heading-lg:1.3; to ensure consistent readability across different text sizes.

How should line heights be handled when displaying copyright information?

Copyright notices should generally use a standard line height, typically around 1.2 - 1.4, to ensure clarity and visual balance.

When was the last update to this design system?

This design system was last updated on 2024, reflecting the latest best practices and user feedback.

▶ Try it live

Everything above runs in your browser — open Hash Function Avalanche Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Hash Function Avalanche Visualizer simulation

What did you find?

Add reproduction steps (optional)