Back to blog

Five CSS Features That Shipped Everywhere in 2026

Container style queries, the :open pseudo-class, field-sizing, contrast-color() and shape() all reached cross-browser support this year, retiring a pile of JavaScript workarounds.

CSS source code displayed in a code editor with syntax highlighting

Every year a handful of CSS features cross from "Chrome only" to "works everywhere", and each one quietly retires a JavaScript utility. This year several landed in quick succession. The Baseline project makes the status legible: once a feature is supported across all major browsers it becomes Newly available, and after older versions age out it becomes Widely available.

1. Container style queries

Container queries are no longer limited to size. Style queries let you apply styles based on the custom property values of a parent container, so a component can adapt its theme or layout to context without a combinatorial explosion of modifier classes. Instead of card--dark, card--compact and every combination of the two, the parent sets a variable and the child responds.

2. The :open pseudo-class

Styling elements with open and closed states — <dialog>, <details>, popovers — used to mean checking attributes or toggling classes from script. The :open pseudo-class matches these elements only while they are open. One CSS line replaces a small pile of JavaScript.

Code editor and rendered interface preview side by side
Every bit of presentational logic moved into CSS is JavaScript that no longer has to run.

3. field-sizing

This property controls how form controls size themselves. With field-sizing: content, a textarea, input or select grows and shrinks to fit its content with no auto-resize script involved. Anyone who has ever npm-installed a library purely to make a textarea expand knows exactly how welcome this is.

4. contrast-color()

Picking readable text color over a background the user chose used to mean either hardcoding light/dark pairs per background or computing WCAG ratios in JavaScript. This function, which reached Baseline status in spring 2026 with support in Chrome 147, Firefox 146 and Safari 26, hands the calculation to the browser. For badges, tags and user-themable interfaces it removes a whole category of glue code.

5. The shape() function

With shape() you can write clip paths using percentages, rem, calc() and custom properties, so the shape scales with the element instead of needing JavaScript to keep an SVG path string in sync with layout. For a design system with one signature angled-card shape used at dozens of sizes, that is the difference between a CSS rule and a maintained resize-observer utility.

And a bonus: :has()

The :has() pseudo-class reached Widely available status this year, meaning even conservative projects can stop hedging. The "parent selector" developers asked for over a decade is now simply a normal tool.

How to decide whether to use them

"Newly available" means the latest version of every major browser supports it — not that all of your users are on that version. The safe rule: if the feature is purely presentational (shape, contrast-color), use it today and let older browsers see the plainer version. If the feature is load-bearing for functionality, check your own browser analytics first, then decide.

Five CSS Features That Shipped Everywhere in 2026 — 1Five CSS Features That Shipped Everywhere in 2026 — 2Five CSS Features That Shipped Everywhere in 2026 — 3
Written by

Hesam Ziaee, a web developer and programmer who builds fast, user-friendly websites with Vue.js, Quasar and Node.js.