Skip to main content
🎨 CSS as a design system·Module B3 · Lesson 13
TaskQuick 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
Theory

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.

🔒

Sign up to start coding

Theory is open to everyone. The interactive editor, live preview, and check are unlocked with a 7-day free trial — card required, cancel anytime.

Sign up — free trial →

First 15 lessons in each track are free. No card needed for those.

PreviousNext lesson →

Get one Python or web tip a day — by email

Short, hand-written, no spam. Unsubscribe in one click.