Typography is the foundation of visual hierarchy and brand personality. Choose fonts that are beautiful, unique, and interesting. Pair a distinctive display font with a refined body font.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pbakaus/impeccable/llms.txt
Use this file to discover all available pages before exploring further.
Classic Typography Principles
Vertical Rhythm
Your line-height should be the base unit for ALL vertical spacing. If body text hasline-height: 1.5 on 16px type (= 24px), spacing values should be multiples of 24px. This creates subconscious harmony—text and space share a mathematical foundation.
Modular Scale & Hierarchy
The common mistake: too many font sizes that are too close together (14px, 15px, 16px, 18px…). This creates muddy hierarchy. Use fewer sizes with more contrast. A 5-size system covers most needs:| Role | Typical Ratio | Use Case |
|---|---|---|
| xs | 0.75rem | Captions, legal |
| sm | 0.875rem | Secondary UI, metadata |
| base | 1rem | Body text |
| lg | 1.25-1.5rem | Subheadings, lead text |
| xl+ | 2-4rem | Headlines, hero text |
Readability & Measure
Usech units for character-based measure (max-width: 65ch). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more.
Font Selection & Pairing
Choosing Distinctive Fonts
Avoid the invisible defaults: Inter, Roboto, Open Sans, Lato, Montserrat. These are everywhere, making your design feel generic. They’re fine for documentation or tools where personality isn’t the goal—but if you want distinctive design, look elsewhere. Better Google Fonts alternatives:- Instead of Inter → Instrument Sans, Plus Jakarta Sans, Outfit
- Instead of Roboto → Onest, Figtree, Urbanist
- Instead of Open Sans → Source Sans 3, Nunito Sans, DM Sans
- For editorial/premium feel → Fraunces, Newsreader, Lora
System fonts are underrated:
-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui looks native, loads instantly, and is highly readable. Consider this for apps where performance > personality.Pairing Principles
The non-obvious truth: You often don’t need a second font. One well-chosen font family in multiple weights creates cleaner hierarchy than two competing typefaces. Only add a second font when you need genuine contrast (e.g., display headlines + body serif). When pairing, contrast on multiple axes:- Serif + Sans (structure contrast)
- Geometric + Humanist (personality contrast)
- Condensed display + Wide body (proportion contrast)
Web Font Loading
The layout shift problem: fonts load late, text reflows, and users see content jump. Here’s the fix:Modern Web Typography
Fluid Type
Useclamp(min, preferred, max) for fluid typography. The middle value (e.g., 5vw + 1rem) controls scaling rate—higher vw = faster scaling. Add a rem offset so it doesn’t collapse to 0 on small screens.
OpenType Features
Most developers don’t know these exist. Use them for polish:Typography System Architecture
Name tokens semantically (--text-body, --text-heading), not by value (--font-size-16). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system.
Accessibility Considerations
Beyond contrast ratios (which are well-documented), consider:- Never disable zoom:
user-scalable=nobreaks accessibility. If your layout breaks at 200% zoom, fix the layout. - Use rem/em for font sizes: This respects user browser settings. Never
pxfor body text. - Minimum 16px body text: Smaller than this strains eyes and fails WCAG on mobile.
- Adequate touch targets: Text links need padding or line-height that creates 44px+ tap targets.
Guidelines
DO
- Use a modular type scale with fluid sizing (clamp)
- Vary font weights and sizes to create clear visual hierarchy
- Choose distinctive, memorable fonts
- Use OpenType features for polish
DON’T
- Use overused fonts—Inter, Roboto, Arial, Open Sans, system defaults
- Use monospace typography as lazy shorthand for “technical/developer” vibes
- Put large icons with rounded corners above every heading—they rarely add value and make sites look templated
- Skip fallback font definitions
- Use more than 2-3 font families per project
