Typography
Tune headings, paragraphs, lists, and code styles for docs.
Docs typography should be calm, readable, and dense enough for repeated use. Avoid oversized headings inside article bodies.
What to tune
Start with these typography decisions before changing the broader page layout.
- Heading weight and spacing.
- Paragraph line height.
- List spacing.
- Inline code treatment.
- Code block size and padding.
Heading rhythm
Headings should create clear breaks without making every section feel like a landing page. Docs readers scan more than they admire.
Paragraph width
Keep article content narrow enough for comfortable reading. Wide lines slow readers down and make code-heavy pages harder to follow.
Prose components
Use the shared MDX component map when you want every docs and blog page to share the same prose styling.
Code styling
Inline code should be visible but not noisy. Code blocks should have enough padding and contrast to support longer examples.
Reading rhythm
Reading rhythm comes from spacing, line height, and heading contrast. It should help readers move through a page without feeling like every section is competing for attention.
Section spacing
Use more space before major sections than minor sections. This makes ## and ### relationships visible even before reading the text.
List density
Lists should be dense enough to scan but not so tight that every bullet feels cramped. Long lists usually need grouping or supporting paragraphs.
Code typography
Code typography needs a different rhythm than prose. It should support scanning file names, commands, and examples without shrinking text too far.
Command blocks
Commands should be easy to copy and should not wrap awkwardly on normal desktop widths. Use short examples when the command itself is the point.