Frontend / README.md

CSS

Updated 2 min read index source
On this page4
  1. The notes
  2. What gets asked
  3. Preprocessors, honestly
  4. Related

CSS

CSS has no versions any more. “CSS3” was the last monolithic release; since then each module — Grid, Cascade Layers, Container Queries, Nesting — ships and reaches Baseline on its own schedule. Saying “CSS3 is the latest” dates you; naming Baseline as the thing you check before using a feature does not.

The notes

# File Covers
01 Stacking Context and Block Formatting Context why z-index fails, block formatting contexts
02 Container Queries and Subgrid component-relative breakpoints, aligning nested grids
03 Modern Selectors and Cascade Layers @layer, :has, :is, :where, nesting
04 Logical Properties, Modern CSS, and Performance Hints content-visibility, containment, what costs paint
05 Cascade, specificity and the box model which rule wins, and why sizes come out wrong
06 Flexbox and Grid one axis or two, and centring

What gets asked

Interviews skip syntax and go to the three things that make CSS feel unpredictable, because they are the three that reveal whether someone has debugged a layout or only written one:

  • “This z-index: 9999 does nothing.” A stacking context. transform, opacity below 1, filter and will-change all create one, and a child cannot escape its parent’s — 01.
  • “Why is this rule losing?” The cascade, and specifically that cascade layers now outrank specificity — 05.
  • “Why is this element wider than I set it?” content-box, or a flex item refusing to shrink below its content — 05, 06.

Preprocessors, honestly

Sass solved nesting, variables and @import. CSS now has native nesting, custom properties and @layer, so the remaining reasons are mixins, loops and a large existing codebase.

The current answer is that most new projects do not need one — and that the build-time cost was always the real argument against, since custom properties are live at runtime in a way Sass variables never were. That is what makes themable design tokens work: Design Tokens and Theming at Scale.

Contents 6