Aller au contenu principal
← 🎨 CSS as a design systemΒ·Module B3 Β· LeΓ§on 13
TΓ’cheQuick recap. Write CSS that uses all 4 B1-B3 fundamentals. Define :root with --gap: 12px. Apply box-sizing: border-box to *. Make .row a grid with grid-template-columns: 100px 100px 100px and gap: var(--gap). The 4 checks verify each.

Recap: Cascade, box, layout, grid

50 XP5 min
ThΓ©orie

Quick recap β€” Modules B1-B3

Box, layout engines, grid. The 4 things you write in every real stylesheet:

  1. `:root` custom properties β€” design tokens (--space-md, --color-bg) that flow through the cascade.
  2. `var(--token)` β€” consume the token. Browsers fall back to the second arg if undefined.
  3. `box-sizing: border-box` β€” width includes padding+border. Universal selector, once, on *.
  4. `display: grid` + `grid-template-columns` β€” the modern default. Flex is for one axis, grid for two.

If any feels random, redo B1-04 / B1-06 / B2-09 / B3-02 then come back.

πŸ”’

Inscris-toi pour coder

La thΓ©orie est ouverte Γ  tous. L'Γ©diteur, l'aperΓ§u live et le check se dΓ©bloquent avec un essai gratuit de 7 jours β€” carte requise, annulable Γ  tout moment.

S'inscrire β€” essai gratuit β†’

Les 10 premières leçons de chaque parcours sont gratuites. Pas de carte requise.

← PrΓ©cΓ©dentLeΓ§on suivante β†’

Recevez une astuce Python ou web par jour β€” par email

Court, Γ©crit Γ  la main, sans spam. DΓ©sabonnement en un clic.