HTML & CSS

The Platform Replaced Half Your Utility Library

:has(), container queries, popover, light-dark(). The primitives that used to justify a dependency now ship in the browser.

3 min readPublished November 21, 2026
Share on X

For a decade, the answer to "how do I style this" was a utility framework. That answer is getting weaker every year, because the browser absorbed the primitives the framework was built to imitate. Not all of them, and not everywhere, but enough that a small site can now ship a design system in a few hundred lines of plain CSS.

What the platform now does natively

  • `:has()` — style a parent based on its children. The selector that made JavaScript state classes unnecessary for a whole category of UI.
  • Container queries — size a component by its container instead of the viewport. This is the one that changes how you author responsive components.
  • Nesting — write `&:hover` inside the rule. The compiled output is what you would have written anyway, and the source stays near the thing it styles.
  • `dialog` and `popover` — a real modal and a real light-dismiss layer, with focus management and an Escape key, without a portal.
  • `color-mix()` and `light-dark()` — a theme in two lines instead of a build step and a class on `<html>`.
  • `text-wrap: balance` and `pretty` — headline and paragraph wrapping that used to be a JavaScript measuring loop.
  • `clamp()` — fluid type and spacing without a single breakpoint.
/* A card that responds to its container, not the page. */
.card { container-type: inline-size; }
@container (min-width: 34rem) {
  .card { display: grid; grid-template-columns: 12rem 1fr; }
}

/* A theme, without a single class toggle. */
:root { color-scheme: light dark; }
body {
  background: light-dark(#fff, #121212);
  color: light-dark(#111, #ededed);
}

What a utility layer still earns

Consistency at scale. A utility framework is a shared vocabulary and a constraint system, and on a team of twelve that is worth real money. It also gives you a design-token pipeline and a component library that a solo builder would have to write anyway. The mistake is not using one; it is using one to express a layout the platform now expresses better.

Reach for the platform for layout and state. Reach for a system for vocabulary and consistency.

The support question, honestly

Support is not uniform, and it moves. `:has()` and container queries have been broadly available for years; anchor positioning arrived later and still needs a check. `@scope` is newer still. The discipline is the same one you already use for any new API: check the current support data, decide the fallback, and do not build the only path to your content on a feature a meaningful share of your readers lack.

  • CSS
  • HTML
  • Web Platform
KI

Kadirul IslamVerified author

Founder, A.K Solution

Follow on X

Founder of A.K Solution. Full-stack engineer building AI agent tools like KiCode, JSON form engines like ki-forms, and high-scale SEO systems. Obsessed with shipping fast, zero-bloat software that lasts.

More from Kadirul Islam

One Container Query Beats Five Breakpoints

A breakpoint is a guess about where a layout breaks. A container query is the layout telling you.

3 min readCSS

The Model You Pick Is a Price Decision

Frontier benchmarks move monthly. Your invoice does not. Choose on cost per successful task, not on the top row of a leaderboard.

3 min readAI Models