typestar

Responsive & modern CSS

21 steps in 6 sets of CSS.

What CSS picked up in the last few years, which is a lot. Media and container queries, custom properties, then the selectors that ask questions: :has(), :is(), :where().

Motion, effects and generated content finish it. Twenty-one steps, and several of these solve problems people are still writing JavaScript for.

Start this tour

Responsive

Custom properties

Selectors that ask questions

  • The parent selector:has() finally lets a rule depend on what an element contains.
  • :is() and :where()The same grouping, and they differ on exactly one thing: what they do to specificity.
  • NestingThe child rules live inside the parent, which is how you read the component in one place.

Motion & effects

Generated content

  • Pseudo-elementsGenerated boxes before and after content, plus the ones for text and UI.
  • Nesting and layersTwo modern additions: nested rules, and cascade layers for ordering.

Encore

The other CSS tours