Course 02 · Foundation

CSS
Everything you can see.

Selectors, the box model, layout with flexbox and grid, and motion that has a reason to move.

26Lessons
≈ 5hReading
26Playable now
CascadeBox modelFlexboxGridResponsiveMotion

0 of 26 lessons finished — nothing yet

The syllabus

26 lessons,
in the order they build on each other.

Start lesson one ↗
01

How CSS is applied

Rules, declarations, where stylesheets go, and the order the browser resolves them in.

≈ 10 min
02

Selectors

Type, class, id, attribute, combinators, and the ones worth knowing beyond the basics.

≈ 12 min
03

The cascade and specificity

Why your rule lost: origin, layers, specificity, order, inheritance and !important.

≈ 12 min
04

The box model

Content, padding, border, margin, box-sizing, and why two margins become one.

≈ 11 min
05

Display and flow

block, inline, inline-block, flow-root, and what normal document flow actually does.

≈ 10 min
06

Units

px, rem, em, %, vh, vw, ch, fr — which one to reach for and why.

≈ 10 min
07

Colour

hex, rgb, hsl, oklch, alpha, colour-mix, currentColor and contrast that passes.

≈ 10 min
08

Typography

Families and fallbacks, loading webfonts, size, line height, measure and the shorthand.

≈ 12 min
09

Flexbox

One axis: direction, justify, align, wrap, gap, grow, shrink and basis.

≈ 14 min
10

Grid

Two axes: template columns, fr, repeat, minmax, auto-fit, areas and placement.

≈ 14 min
11

Layout patterns

Centring, holy grail, sidebar, card deck, sticky footer — solved once, correctly.

≈ 12 min
12

Position and stacking

relative, absolute, fixed, sticky, containing blocks, z-index and stacking contexts.

≈ 12 min
13

Overflow and scrolling

Clipping, scroll containers, scroll snap, and stopping the page scrolling sideways.

≈ 9 min
14

Backgrounds and borders

Gradients, multiple backgrounds, radius, outline, shadow and when to use each.

≈ 11 min
15

Responsive design

Mobile first, media queries, fluid type with clamp, and images that fit.

≈ 13 min
16

Container queries

Components that respond to their own width instead of the window.

≈ 10 min
17

Custom properties

Defining, scoping, theming, fallbacks and reading or writing them from JavaScript.

≈ 11 min
18

Transitions

What is animatable, duration, delay, easing and the properties that are cheap to move.

≈ 10 min
19

Keyframe animation

Keyframes, iteration, fill modes, and reduced motion as a first-class case.

≈ 11 min
20

Transforms

translate, scale, rotate, origin, 3D, perspective and preserve-3d.

≈ 11 min
21

Filters, blending and masks

blur, backdrop-filter, mix-blend-mode, clip-path and mask-image.

≈ 10 min
22

Pseudo-classes and elements

:hover, :focus-visible, :has, :is, :where, ::before, ::after and ::selection.

≈ 11 min
23

Styling forms

Inputs, selects, checkboxes, accent-color, validity states and focus that is visible.

≈ 10 min
24

Organising CSS

Naming, layers, resets, tokens, and keeping a stylesheet you can still change in a year.

≈ 11 min
25

Performance

What triggers layout, paint and composite, and the properties that stay off the main thread.

≈ 10 min
26

Debugging CSS

Computed styles, the box model panel, and finding the rule that actually won.

≈ 10 min