Modern CSS

What is safe to ship, and what it replaces.

CSS changed more between 2022 and 2026 than in the ten years before. Most of what a preprocessor, a positioning library or a scroll listener used to do is now one declaration. The only question left is whether your users’ browsers have it, and that has a dated answer.

Layout

Components that size themselves, and grids that finally share their tracks.

Container queries

Widely availablesince Aug 2025

Replaces: Media queries that guess at a component’s width from the viewport. The component asks its own container instead, so the same card works in a sidebar and in a hero.

Chrome
105
Edge
105
Firefox
110
Safari
16

Shipped by 5 of the 24 sites we have decoded.

Logical properties

Widely availablesince Mar 2024

Replaces: margin-left and padding-right, which are wrong the moment a layout runs right to left. inline and block follow the writing mode.

Chrome
89
Edge
89
Firefox
66
Safari
15

Shipped by 16 of the 24 sites we have decoded.

Anchor positioning

Limited availability

Replaces: A JavaScript positioning library for tooltips, menus and popovers. One element is tethered to another in CSS, with fallbacks when it would overflow.

Chrome
not yet
Edge
not yet
Firefox
not yet
Safari
27

Not yet complete in Chrome, Edge, Firefox. The dataset counts a feature as supported only when every part of it has shipped, so an engine listed here may already have most of it. Check the MDN table before ruling it out.

Shipped by 5 of the 24 sites we have decoded.

Selectors and the cascade

Less specificity warfare, fewer wrapper classes.

:has()

Widely availablesince Jun 2026

Replaces: Toggling a class on a parent from JavaScript. A parent can be styled by what it contains: a card with an image, a form with an invalid field.

Chrome
105
Edge
105
Firefox
121
Safari
15.4

Shipped by 16 of the 24 sites we have decoded.

Nesting

Widely availablesince Jun 2026

Replaces: A preprocessor kept only for nesting. Rules nest natively, including media and container queries inside the rule they modify.

Chrome
120
Edge
120
Firefox
117
Safari
17.2

Shipped by 1 of the 24 sites we have decoded.

@scope

Newly availablesince Mar 2026

Replaces: BEM-length class names invented to stop styles leaking. A rule applies from one element down to a boundary you name, and no further.

Chrome
143
Edge
143
Firefox
146
Safari
26.4

In every core browser since Mar 2026. It becomes widely available 30 months after that.

Shipped by 0 of the 24 sites we have decoded.

Colour

Perceptual colour spaces, and palettes derived in CSS instead of in a build step.

color-mix()

Widely availablesince Nov 2025

Replaces: A Sass function, or a hand-picked hex for every hover state. Two colours are mixed in the browser, in the colour space you choose.

Chrome
111
Edge
111
Firefox
113
Safari
16.2

Shipped by 12 of the 24 sites we have decoded.

Relative colors

Newly availablesince Sept 2024

Replaces: A token for every variant of a brand colour. Hover, muted and border colours are derived from one source value by channel arithmetic.

Chrome
125
Edge
125
Firefox
128
Safari
18

In every core browser since Sept 2024. It becomes widely available 30 months after that.

Shipped by 9 of the 24 sites we have decoded.

light-dark()

Newly availablesince May 2024

Replaces: Every colour declared twice, once inside a prefers-color-scheme block. One declaration carries both values.

Chrome
123
Edge
123
Firefox
120
Safari
17.5

In every core browser since May 2024. It becomes widely available 30 months after that.

Shipped by 2 of the 24 sites we have decoded.

contrast-color()

Newly availablesince Apr 2026

Replaces: Computing in JavaScript whether text on a dynamic background should be black or white. The browser picks the readable one.

Chrome
147
Edge
147
Firefox
146
Safari
26

In every core browser since Apr 2026. It becomes widely available 30 months after that.

Shipped by 0 of the 24 sites we have decoded.

Motion

Animation that follows scroll and state, without a library listening for either.

View transitions

Newly availablesince Oct 2025

Replaces: A router-level animation library. The browser snapshots the old and new states and animates between them, across full page loads too.

Chrome
111
Edge
111
Firefox
144
Safari
18

In every core browser since Oct 2025. It becomes widely available 30 months after that.

Shipped by 1 of the 24 sites we have decoded.

Scroll-driven animations

Limited availability

Replaces: A scroll listener and an IntersectionObserver driving classes. An animation’s progress is tied to scroll position, off the main thread.

Chrome
115
Edge
115
Firefox
not yet
Safari
26

Not yet complete in Firefox. The dataset counts a feature as supported only when every part of it has shipped, so an engine listed here may already have most of it. Check the MDN table before ruling it out.

Shipped by 2 of the 24 sites we have decoded.

@starting-style

Newly availablesince Aug 2024

Replaces: A requestAnimationFrame trick to animate something in from display: none. The entry state is declared, and the transition just runs.

Chrome
117
Edge
117
Firefox
129
Safari
17.5

In every core browser since Aug 2024. It becomes widely available 30 months after that.

Shipped by 2 of the 24 sites we have decoded.

Registered custom properties

Newly availablesince Jul 2024

Replaces: Gradients and custom properties that snap instead of animating. A typed property can be interpolated, so a gradient angle or a hue can transition.

Chrome
85
Edge
85
Firefox
128
Safari
16.4

In every core browser since Jul 2024. It becomes widely available 30 months after that.

Shipped by 9 of the 24 sites we have decoded.

UI primitives

Things that used to need JavaScript and a positioning library.

Popover

Newly availablesince Jan 2025

Replaces: A hand-rolled dropdown with focus handling, an escape-key listener and a z-index fight. The top layer, light dismiss and keyboard behaviour come with the attribute.

Chrome
116
Edge
116
Firefox
125
Safari
17

In every core browser since Jan 2025. It becomes widely available 30 months after that.

Shipped by 3 of the 24 sites we have decoded.

Type and forms

Small properties that remove whole categories of hack.

text-wrap: balance

Newly availablesince May 2024

Replaces: Manual line breaks and max-width guesses to stop a headline ending on one orphaned word. The browser balances the lines.

Chrome
114
Edge
114
Firefox
121
Safari
17.5

In every core browser since May 2024. It becomes widely available 30 months after that.

Shipped by 17 of the 24 sites we have decoded.

field-sizing

Newly availablesince Jun 2026

Replaces: A script that resizes a textarea as you type. The field grows to fit its content.

Chrome
123
Edge
123
Firefox
152
Safari
26.2

In every core browser since Jun 2026. It becomes widely available 30 months after that.

Shipped by 1 of the 24 sites we have decoded.

Where these answers come from

Every status, date and browser version on this page is read at build time from web-features (version 3.39.0, Apache-2.0), the open dataset maintained by the W3C WebDX Community Group that MDN’s badges are drawn from. We do not restate it from memory, and we did not decide what counts as safe: widely available means every core browser has had it for at least 30 months, newly available means every core browser has it now. The one sentence on what each feature replaces is ours.

See these features in real sites: decode any page to read the CSS it declares, or start from the basics in Learn CSS and the CSS tools.