What's Moving Through the CSS Pipeline
Flexbox and grid turned CSS from a bag of workarounds into something coherent. The current batch of proposals pushes that same shift further, and much of the work sits at the stage of working drafts, editor's drafts, or explainers. Treat the snippets that follow as illustrative: syntax may change before anything ships.
Nesting Without a Preprocessor
Native nesting reached First Public Working Draft status, bringing it closer to reality than before. Since nesting is one of the main reasons teams adopt preprocessors, a native version offers a path to simplifying build tooling. Conditional rules can be nested as well.
.card {
& .title { }
& .body { }
@media (min-inline-size > 1000px) {
& { }
}
@nest body.dark & { }
}
A variation said to be workable drops the & requirement for simple selectors and avoids @nest entirely.
.card {{
.title { }
.body { }
body.dark & { }
}}
Container Queries and the Units That Come With Them
Container queries currently exist only as an editor's draft, the CSS Containment Module Level 3, though Chrome already implements them behind a flag. They let styling decisions follow the size of the container rather than the viewport—an obvious fit for component-driven development. Background reading is plentiful: Miriam Suzanne's proposal and explainer, Stephanie Eckles' primer, Geoff Graham's collection of examples, and Una Kravets' write-up on @container. A small demo site is also available, though it may render oddly in Chrome without the flag enabled.
/* Set containment on the parent you're querying */
.card-container {
/* Both work right now, not sure which is right */
contain: style layout inline-size;
container: inline-size;
}
.card {
display: flex;
}
@container (max-width: 500px) {
/* Must style a child, not the container */
.card {
flex-direction: column;
}
}
Container units have their own draft spec and, taken together with container queries, roughly double what the feature can do. The unit derives from the container's width, height, or its inline-size or block-size; qi is likely the most useful of them. In practice this means CSS that scopes to a container, styles itself from that container's size, and passes the size along for other properties—font-size is the easy case, with gap and padding as further candidates.
/* Set containment on the parent you're querying */
.card-container {
/* Both work right now, not sure which is right */
contain: style layout inline-size;
container: inline-size;
}
.card h2 {
font-size: 1.5rem; /* fallback */
}
@container type(inline-size) {
.card h2 {
font-size: clamp(14px, 1rem + 2qi, 56px)
}
}
Cascade Layers Decide Winners Differently
Cascade layers, in working draft form, reframes how selectors win in the cascade. Today the contest is mostly about specificity: the most specific selector prevails unless inline styles or !important rules intervene. Under layers, any matching selector sitting in a higher layer wins. Miriam Suzanne provides a simple demo and an explainer; Bramus Van Damme covers the future of @layer in depth.
@layer base;
@layer theme;
@layer utilities;
/* Reset styles with no layer (super low) */
* { box-sizing: border-box; }
@layer theme {
.card { background: var(--card-bg); }
}
@layer base {
/* Most styles? */
}
@layer utilities {
.no-margin { margin: 0; }
}
Conditionals, Scope, and Proximity
Tab Atkins' proposal for When/Else rules has been accepted. It expresses @media and @supports queries in a form that makes else branches straightforward—media queries can already perform some logic, but mutually exclusive queries have long been awkward to write.
@when media(width >= 400px) and media(pointer: fine) and supports(display: flex) {
/* A */
} @else supports(caret-color: pink) and supports(background: double-rainbow()) {
/* B */
} @else {
/* C */
}
Scoped styles, an editor's draft in the cascade module, provide syntax for a block of styles bound to a particular selector and its interior—and to stopping the scope early, producing what has been called a scope donut. The most interesting piece is proximity strength.
.light-theme a { color: purple; }
.dark-theme a { color: plum; }
<div class="dark-theme">
<a href="#">plum</a>
<div class="light-theme">
<a href="#">also plum???</a>
</div>
</div>
That's the point: nothing today expresses cleanly that the proximity of the link to .light-theme should win. Both themes have equal specificity, so the later .dark-theme takes precedence. Scoped styles may address this as well.
@scope (.card) to (.content) {
:scope {
display: grid;
grid-template-columns: 50px 1fr;
}
img {
filter: grayscale(100%);
border-radius: 50%;
}
.content { ... }
}
/* Proximity help! */
@scope (.light-theme) {
a {
color: purple;
}
}
@scope (.dark-theme) {
a {
color: plum;
}
}
Not for Production, and Uncertainty Ahead
Nothing in this collection is usable on production sites right now. The process typically runs: specs are finished and agreed, then browsers—hopefully more than one—pick them up, and finalization may follow. Some proposals may die; some may land quickly and others slowly; some may arrive in certain browsers only. Evergreen browsers do at least mean that whatever ships spreads fast. At present almost all of the biggest CSS features enjoy cross-browser support, but with this much in flight, support for the newest capabilities is likely to be noticeably patchier.



