Modern CSS in 2026: View Transitions, Anchor Positioning and Scroll-Driven Animations

By Eoin Villarin, 2026-10-17, updated 2026-10-28

View transitions, anchor positioning and scroll-driven animations now work across major browsers. Learn what is safe to ship in 2026, with code, support data and fallbacks.

Which modern CSS features are ready for production use in 2026?

View transitions, anchor positioning and scroll-driven animations are the modern CSS features ready for production in 2026, replacing much of the JavaScript once used for page transitions, tooltips and scroll effects. Same-document view transitions and anchor positioning are Baseline newly available, Firefox 159 enables scroll-driven animations by default, and cross-document transitions work as progressive enhancement.

Key takeaways

  • Same-document view transitions became Baseline newly available in October 2025 when Firefox 144 shipped them.
  • Anchor positioning became Baseline newly available in January 2026 with Firefox 147, joining Chrome 125 and Safari 26.
  • Cross-document view transitions use an @view-transition rule with navigation: auto on both pages, supported from Chrome 126 and Safari 18.2.
  • Every view-transition-name must be unique on the page, or the browser skips the transition entirely.
  • Most interface transitions feel right between 200 and 400 milliseconds, and prefers-reduced-motion should remove or soften movement.

For years, a polished interface meant extra JavaScript: a positioning library for tooltips, a router plugin for page transitions and scroll listeners for every reveal effect. In 2026 three modern CSS features handle most of that natively: view transitions, anchor positioning and scroll-driven animations.

That matters beyond developer convenience. Less JavaScript usually means faster interactions, fewer positioning bugs and smaller bundles, and it shows up in Core Web Vitals and in how a site feels on a mid-range phone.

This guide covers where each feature stands in Chrome, Safari and Firefox as of October 2026, the CSS I use to implement them, and how to ship them on Shopify, WordPress and React sites without breaking older browsers.

Which modern CSS features are ready for production in 2026?

All three features are focus areas in Interop 2026, the yearly project where browser makers agree to fix and align specific features, according to the Interop 2026 announcement. The remaining gaps are being actively closed.

Long exposure light painting spinning through a room, evoking smooth CSS transitions
Transitions, anchoring and scroll effects now ship natively in CSS. Photo: Suchit Patel, CC0

Here is where support stands. Baseline newly available means a feature works in the latest version of every major browser engine.

FeatureChrome and EdgeSafariFirefoxStatus in October 2026
Same-document view transitions11118144Baseline newly available since October 2025
Cross-document view transitions12618.2Not supportedSafe as a progressive enhancement
Anchor positioning12526147Baseline newly available since January 2026
Scroll-driven animations11526159Firefox 159 enables them by default on 27 October 2026

In practice, same-document view transitions and anchor positioning are safe to use today, and scroll-driven animations join them as Firefox 159 reaches users. Cross-document view transitions are the exception: Firefox users simply get a normal page load.

How do CSS view transitions work?

A view transition takes a snapshot of the page before a change, lets you update the DOM, then animates between the old and new states. By default you get a cross-fade. Give individual elements a name and the browser morphs them from their old position and size to the new ones.

Same-document transitions for interactive components

Same-document transitions became Baseline newly available in October 2025 when Firefox 144 shipped them, as covered in web.dev's post on same-document view transitions reaching Baseline. They suit filters, tabs, product galleries and client-side route changes.

function updateView(render) {
  // Browsers without support just update the DOM instantly
  if (!document.startViewTransition) {
    render();
    return;
  }
  document.startViewTransition(() => render());
}
.product-card img {
  view-transition-name: match-element;
  view-transition-class: product-image;
}

::view-transition-group(*.product-image) {
  animation-duration: 300ms;
  animation-timing-function: ease-out;
}

view-transition-name: match-element generates a unique name for each element automatically, so you do not need a different name for every product card. view-transition-class then lets one rule style the whole group. Firefox's first implementation does not support view transition types, so treat types as an extra rather than a requirement.

Cross-document transitions for multi-page sites

This is the feature I am most excited about for WordPress and Shopify themes, because those are mostly traditional multi-page sites. A few lines of CSS on both pages opt into an animated navigation between same-origin pages:

/* Add to the stylesheet shared by both pages */
@view-transition {
  navigation: auto;
}

.site-header {
  view-transition-name: site-header;
}

Chrome and Edge support this from version 126 and Safari from 18.2, according to Chrome's guide to cross-document view transitions. Browsers without support ignore the at-rule and navigate normally, which makes it one of the safest enhancements you can add to an existing theme.

Debugging view transitions

Most broken transitions come from naming mistakes. Every view-transition-name must be unique on the page at the moment of the snapshot, and if two visible elements share a name the browser skips the transition entirely. This is easy to hit when a product card name is hard-coded inside a loop, which is exactly what match-element avoids.

Chrome DevTools helps a lot here. The Animations panel lets you slow a transition down or pause it, and the Elements panel shows the temporary ::view-transition pseudo-element tree while it runs, so you can see which snapshots exist and style each group precisely.

Always respect reduced motion

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

Large animated movements can trigger nausea and dizziness for some people. Respecting prefers-reduced-motion is basic accessibility, and it also counts in compliance work for laws such as the European Accessibility Act.

How to use CSS anchor positioning for tooltips and menus

Tooltips, dropdowns and popovers used to need JavaScript to measure the trigger, calculate coordinates and recalculate on every scroll and resize. Anchor positioning lets the browser tie one element to another declaratively. It became Baseline newly available in January 2026 when Firefox 147 shipped it, joining Chrome 125 and Safari 26.

Padlock locked onto a blue railing, much like a tooltip anchored to its trigger
Anchor positioning ties tooltips to their triggers without JavaScript. Photo: rawpixel, CC0

The core properties

  • anchor-name marks an element as an anchor, using a dashed name such as --cart.
  • position-anchor tells a positioned element which anchor to follow.
  • position-area places it in a grid of areas around the anchor, such as top or bottom span-right.
  • anchor() returns an anchor edge for precise inset values.
  • position-try-fallbacks lists alternatives, such as flip-block, for when the element would overflow the viewport.

A tooltip with the popover attribute and anchor positioning

The popover attribute gives you the top layer, light dismiss and Escape key handling. Anchor positioning places it. Together they replace most tooltip libraries:

<button popovertarget="size-help" class="help-trigger">Size guide</button>
<div id="size-help" popover class="tooltip">Measured flat, armpit to armpit.</div>

<style>
  .help-trigger {
    anchor-name: --size-help;
  }

  .tooltip {
    position-anchor: --size-help;
    position-area: top;
    inset: auto;
    margin: 0 0 8px;
    position-try-fallbacks: flip-block, flip-inline;
  }
</style>

MDN's reference for position-try-fallbacks explains how the browser tries each option in order until one fits. Keep the trigger a real button so keyboard and screen reader users can open it.

Precise alignment with anchor()

For badges, notification dots and connector lines, the anchor() function gives exact edges:

.cart-button {
  anchor-name: --cart;
}

.cart-count {
  position: absolute;
  position-anchor: --cart;
  top: anchor(top);
  left: anchor(right);
  translate: -50% -50%;
}

Fallbacks for older browsers

Wrap anchor styles in a feature query and give older browsers a simple, usable fallback. If your analytics show meaningful traffic from older browsers, load a JavaScript positioning library only inside that branch, so modern browsers never download it.

@supports not (anchor-name: --test) {
  .tooltip {
    /* Simple fallback: pin to a corner, or load a positioning library */
    inset: auto 1rem 1rem auto;
  }
}

How to build scroll-driven animations without JavaScript

Scroll-driven animations connect a normal CSS animation to scroll progress instead of time. There are two timelines: scroll() tracks how far a scroll container has scrolled, and view() tracks an element as it moves through the viewport.

A reading progress bar

@keyframes grow-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  transform-origin: 0 50%;
  animation: grow-progress linear both;
  animation-timeline: scroll(root block);
}

One gotcha: the animation shorthand resets animation-timeline, so always declare the timeline after the shorthand.

Reveal content as it enters the viewport

@keyframes fade-up {
  from { opacity: 0; translate: 0 2rem; }
  to { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: fade-up linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}

The animation-range property decides which part of the element's journey the animation covers. entry is the phase where the element crosses into the viewport, exit is where it leaves, and cover spans the whole trip. Starting at entry 0% and finishing at cover 30% means the effect completes early, so readers never wait for text to fade in.

Chrome has supported scroll-driven animations since version 115 and Safari since 26. Firefox kept them behind a flag until Firefox 159, which enables them by default and is scheduled for 27 October 2026. The feature query keeps content fully visible in any browser that lacks support, which is the point: never hide content by default and rely on an animation to reveal it.

Keep scroll animations fast

Animate transform, translate, scale and opacity, which browsers can often run off the main thread. Avoid animating width, height or top, which force layout on every frame. Replacing scroll listeners with CSS also frees the main thread for input, which helps the responsiveness metric I cover in my Interaction to Next Paint guide.

How to ship modern CSS features safely

None of these features should be a hard dependency. This is the checklist I follow before shipping them on a client site:

Walkway through a tunnel of colourful lights, like content revealed as you scroll
Scroll-driven animations follow scroll position instead of time. Photo: Laura Adamonis, CC0
  1. Build the baseline first. The page must work and read well with every transition and animation removed.
  2. Feature-detect everything. Use @supports in CSS and checks such as document.startViewTransition in JavaScript.
  3. Never hide content behind an animation. Start visible and animate from a subtle offset.
  4. Respect reduced motion. Remove or soften movement under prefers-reduced-motion: reduce.
  5. Test beyond Chrome. Check Safari on iPhone and Firefox on desktop before launch.
  6. Keep it short. Most interface transitions feel right between 200 and 400 milliseconds.
  7. Measure. Compare Core Web Vitals before and after, using the approach in my Core Web Vitals guide.
Treat these features as enhancements, not dependencies. If the page works with every animation removed, you can ship them today and let browser support catch up on its own.

Where these features fit on Shopify, WordPress and React sites

Shopify themes

Add the @view-transition rule to your theme's main stylesheet for smoother navigation between collection and product pages. Anchor positioning works well for size guides, delivery notes and swatch labels, and scroll-driven reveals suit long product storytelling sections. Test with app blocks enabled, because some apps inject their own fixed-position elements.

WordPress sites

In block themes and classic themes alike, these are plain CSS additions to the theme stylesheet. Cross-document transitions work regardless of page builder, because they only care about navigation between same-origin pages. Keep the rules in your child theme so updates do not overwrite them.

React and Next.js apps

Wrap client-side state changes in document.startViewTransition(), and replace positioning libraries in your component library with anchor positioning where support allows. These features pair well with layout tools I have covered before, such as CSS subgrid.

Frequently asked questions

Can I use CSS view transitions in production in 2026?

Yes. Same-document view transitions have been Baseline newly available since Firefox 144 shipped them in October 2025, so they work in all major engines. Cross-document transitions work in Chrome, Edge and Safari, while Firefox ignores the rule and navigates normally. Add a reduced motion override and treat transitions as an enhancement rather than a dependency.

Does CSS anchor positioning replace JavaScript tooltip libraries?

For most new builds, yes. Anchor positioning has been Baseline newly available since January 2026, and combined with the popover attribute it covers tooltips, dropdowns and menus. Keep a library only as a fallback if your analytics show meaningful traffic from older browsers, or for complex cases such as positioning against virtual elements.

Are scroll-driven animations bad for performance?

Usually the opposite. Scroll-driven animations replace JavaScript scroll listeners, and when you animate transform and opacity the browser can often run them off the main thread. Problems appear when you animate layout properties such as width or top, or attach heavy effects to many elements at once. Measure with real devices before and after.

Do these CSS features work in Shopify and WordPress themes?

Yes. They are plain CSS and browser APIs, so they work in any theme where you can edit or add a stylesheet. On Shopify, add them to the theme's main CSS file. On WordPress, use a child theme stylesheet. Test with apps and plugins enabled, because injected widgets can conflict with fixed positioning.

Start small with modern CSS features

You do not need a redesign to benefit. Add cross-document view transitions to a theme, replace one tooltip library with anchor positioning, or swap a scroll listener for a CSS timeline, then measure the difference. Small, safe wins add up quickly with modern CSS features.

If you want a faster, smoother Shopify, WordPress or React site without piling on JavaScript, get in touch through my contact form or look through my case studies for recent builds.

Related reading