CSS
geoffgraham's profile
Geoff@geoffgraham•May 18
900
Post cover image

Cross-Document View Transitions: The Gotchas Nobody Mentions

Avatar of css_tricksCSS-Tricks•From css-tricks.com•May 18•18m read time

Cross-document view transitions in CSS have several undocumented pitfalls. The `<meta name="view-transition">` tag is deprecated — the correct opt-in is `@view-transition { navigation: auto; }` in CSS. There's also a hard 4-second timeout that silently kills transitions on slow pages, debuggable via the `pagereveal` event. Image distortion during transitions (the 'taffy' effect) is caused by default `object-fit: fill` on pseudo-elements and is fixed with `object-fit: cover` on `::view-transition-old` and `::view-transition-new`. The `pageswap` and `pagereveal` events provide lifecycle hooks for coordinating transitions across documents, including just-in-time element naming. Part 2 will cover scaling `view-transition-name` across many elements and `prefers-reduced-motion` handling.

Sort:

geoffgraham's user avatar
Geoff
@geoffgraham
Joined Apr 10. 2024
900

Certified Neat Freak

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard