Naar hoofdinhoud
← 🎨 CSS as a design systemΒ·Module B4 Β· Les 10
OpdrachtBuild a typography-only article. <article class='prose'><p class='eyebrow'>BLOG</p><h1>Why CSS typography wins in 2026</h1><p>Body paragraph 1 (Lorem ipsum...).</p><h2>Section heading</h2><p>Body paragraph 2.</p></article>. CSS: define :root tokens (--scale 1.25, --text-base 1rem, --text-lg, --text-xl, --text-2xl using calc/var). body: system-ui sans-serif, font-size var(--text-base), line-height 1.6, padding clamp(1rem, 4vw, 3rem). h1: font-size clamp(2rem, 5vw + 1rem, 3.5rem), line-height 1.15, letter-spacing -0.02em, text-wrap balance. h2: font-size var(--text-xl), text-wrap balance. .eyebrow: font-size 0.8rem, letter-spacing 0.08em, text-transform uppercase, color #71717A. p: text-wrap pretty. .prose: max-width 65ch, margin 0 auto.

Sluitsteen module: typografie-eerste artikelpagina

200 XP14 min
Theorie

Putting B4 together

A blog article page where typography does ALL the work β€” no decorations, no fancy backgrounds, just type. The kind of page Substack, Medium, and Stripe ship.

Combine every B4 concept:

  • B4-01: system-ui font stack on body, ui-monospace on code.
  • B4-02: rem for absolute sizes, em for em-related (button padding).
  • B4-03: clamp() for the h1 (fluid).
  • B4-04: line-height 1.6 on body, 1.15 on h1.
  • B4-05: Variable font weight (we skip the @font-face but use weight as a token).
  • B4-06: text-wrap balance on headings, pretty on p.
  • B4-07: Modular scale (--text-base/--text-lg/--text-xl/--text-2xl).
  • B4-08: letter-spacing -0.02em on h1.
  • B4-09: max-width 65ch on .prose, margin auto.

After this, you've shipped typography that doesn't look hobby.

πŸ”’

Registreer om te beginnen met coderen

Theorie is voor iedereen. De editor, live preview en check ontgrendelen met een 7-daagse gratis proefperiode β€” kaart vereist, opzegbaar.

Registreren β€” gratis proef β†’

De eerste 10 lessen in elke track zijn gratis. Geen kaart nodig.

← VorigeVolgende les β†’

EΓ©n Python- of web-tip per dag β€” per e-mail

Kort, met de hand geschreven, geen spam. Met één klik afmelden.