What's New in CSS

A reference of modern CSS features shipping in browsers. Browse by year, or filter below.

WorkflowChrome 146 (expected)

CSS Mixins (@mixin)

Define reusable blocks of declarations with @mixin --name { ... } and apply them with @apply --name. Like Sass mixins but native, with support for parameters and conditional logic.

AnimationChrome 134, Safari 18.2

Cross-Document View Transitions

View transitions now work across full page navigations (MPA), not just SPA. Use @view-transition { navigation: auto } to animate between pages served by the same origin.

LayoutChrome 147 (expected)

CSS Gap Decorations

Style the gaps in grid and flex layouts with column-rule-like properties for both axes. Draw lines, dashes, or gradients between grid tracks without extra DOM elements.

LayoutChrome 137

Reading Flow

Control the keyboard tab and screen reader navigation order of flex and grid children with reading-flow: flex-visual or grid-rows. No need for manual tabindex reordering.

AnimationBaseline 2026 (expected)

Scroll-Driven Animations Interop

animation-timeline: scroll() and view() reach cross-browser baseline. Firefox and Safari ship full support, making scroll-driven animations production-ready without prefixes.

LayoutFirefox 140 (behind flag), Chrome (in development)

Masonry Layout

Native CSS masonry via display: masonry or grid-template-rows: masonry. Pinterest-style layouts without JavaScript. Items fill vertical gaps automatically based on content height.

ColorBaseline 2026

Relative Color Syntax Interop

oklch(from var(--base) ...) and color-mix() reach full cross-browser baseline. All major engines now support relative color manipulation natively.

AnimationBaseline 2026

@starting-style Interop

@starting-style reaches cross-browser baseline, enabling entry animations from display: none without JavaScript timing hacks in all major browsers.

SelectorChrome 105, Firefox 140, Safari 17.2, Edge 105

CSS Custom Highlight API Improvements

The Highlight API gains new features for custom text highlighting. Create spell-check indicators, search highlights, and collaborative editing marks with pure CSS styling.

ColorFirefox 146, Safari 26

contrast-color() Function

Automatically pick a readable text color based on background luminance. contrast-color(bg) returns whichever of black or white meets WCAG AA contrast against the given color — no manual checking needed.

SelectorChrome 134, Firefox (in development)

Scoped Styles Interop (@scope)

@scope reaches broader browser support. Proximity-based styling with upper and lower bounds becomes a practical alternative to BEM and CSS Modules.

LayoutChrome 134

Customizable Select

Fully style HTML select dropdowns with appearance: base-select. The dropdown renders in the top layer, supports rich HTML in options, and the new selectedcontent element reflects the chosen option.

LayoutChrome 135

Invoker Commands

Buttons can now perform actions on other elements declaratively with commandfor and command attributes. Open modals, toggle popovers, and close dialogs without JavaScript.

LayoutChrome 134

Dialog Light Dismiss

The closedby attribute brings popover-style light dismiss to dialogs. Set closedby="any" to close on backdrop click or ESC, or closedby="closerequest" for ESC only.

LayoutChrome 135

popover=hint & Interest Invokers

Hint popovers are ephemeral and don't close other popovers. The interestfor attribute triggers them on hover/focus declaratively. Perfect for tooltips and hovercards.

AnimationChrome 133

Scroll-State Container Queries

Style descendants based on whether a scroll container is stuck, snapped, or scrollable. Use container-type: scroll-state with @container scroll-state() queries.

AnimationChrome 136

Tree Counting Functions

sibling-index() returns an element's position among siblings; sibling-count() returns the total. Ideal for staggered animations and dynamic layouts without manual indexing.

LayoutChrome 135

CSS Scroll Markers & Buttons

Build carousels with CSS-only pseudo-elements. ::scroll-button() creates navigation arrows, ::scroll-marker creates dot indicators. Both are accessible and stylable.

TypographyChrome 133, Safari 18.2

text-box (trim & edge)

Trim invisible font metric space for true optical centering. text-box: trim-both cap alphabetic removes ascent/descent padding so text is visually centered in buttons, badges, and headings.

WorkflowChrome 137

CSS if() Function

Conditional values in CSS properties. Use if(media(...): value; else: fallback) for inline media queries, if(supports(...): ...) for feature queries, and if(style(...): ...) for style queries.

WorkflowChrome 137

CSS Custom Functions (@function)

Define reusable functions with @function --name(args) { @return ... }. Write composable, maintainable CSS logic like conditional border-radius, clamped values, and utility helpers.

WorkflowChrome 133

Advanced attr() Function

attr() now works beyond content property and can parse values as typed data: colors, lengths, numbers, and custom identifiers. Use with any CSS property.

AnimationChrome 137

shape() Function

Create complex, responsive clip paths with the shape() function. Supports curves, lines, and CSS custom properties for dynamic clipping that scales with element size.

LayoutBaseline 2025

stretch Sizing Keyword

Make elements fill their containing block with width: stretch or height: stretch. Unlike 100%, it applies to the margin box so margins are respected without calc() hacks.

LayoutChrome 142

corner-shape Property

Go beyond border-radius with corner-shape: round, bevel, notch, scoop, or squircle. Create flower shapes, hexagonal grids, and iOS-style squircles in pure CSS.

LayoutChrome 138

Anchored Container Queries

Style elements based on their anchor positioning fallback. Use @container anchored(fallback: flip-block) to flip tooltip arrows automatically when position changes.

AnimationChrome 136

Nested View Transition Groups

Retain 3D and clipping effects during view transitions by nesting ::view-transition-group pseudo-elements. Use view-transition-group: nearest on child elements.

ESC