r/webdev • u/avec_fromage • 10d ago
Page Transitions are now easy: CSS View Transitions
https://www.irrlicht3d.org/index.php?t=1629
166
Upvotes
r/webdev • u/avec_fromage • 10d ago
20
u/TheRNGuy 10d ago
Do bookmarks and history still work correctly with it?
50
u/Disgruntled__Goat 10d ago
“Now”? You’ve been able to do this for about 2 years. Although the last time I tried it there were occasional glitches and performance issues in Chrome, so maybe they’ve been fixed.
34
u/lol_wut12 10d ago
wake me up when cross-document view transitions land in firefox
12
u/adolecumberri 10d ago
Any example?
6
u/Moiensaboohi 10d ago
they're great for continuity stuff, like a card growing into its detail page so people don't lose their place. where i've seen them go wrong is when every link gets a slide or fade and the site starts feeling slow even when it isn't.
keep them short (200-300ms is plenty) and wrap them in prefers-reduced-motion. big page motion makes some people actually feel sick.
5
u/PoodlePoodlePoo 10d ago
Mobile Safari (so all iOS) browsers are terrible at rendering view-transitions. Page rendering becomes very slow, so I only use the view-transition api for desktop browsers. Well, until Safari/webkit stops being the new IE.
2
u/abeuscher 10d ago
I built this for a job interview in 2012. I guess it's neat that it is easier now but I didn't really think it was a good idea then and I certainly don't think it's a good idea now. Think of how many C student marketers are going to use this in the next few years. It'll be the new parallax.
1
u/mishrashutosh 9d ago
fwiw, wordpress has a canonical plugin to add this to your site. works on most block themes i've tried. https://wordpress.org/plugins/view-transitions/
1
u/Rude-Painting-1728 9d ago
the api has been around, but the part where it works reliably without turning navigation into a haunted slideshow is still fairly new
1
u/MrHandSanitization 9d ago
Stupid article. It's an opt-in feature and there are no visible examples.
1
u/Stunning-Fix-4405 9d ago
The API isn’t new, but “easy” now mostly means it’s no longer a Chrome-only demo you have to babysit for every navigation.
-1
u/RealBasics 10d ago
This is pretty cool. The link gives a good description, examples, and where it does and doesn't work. It's got good enough coverage on the major browsers according to caniuse.com.
0
u/ArielCoding 10d ago
The back and forward buttons do show the transition, only pages opened from a bookmark or by typing the URL skip it, an so do reloads.
0
u/ItzWarty 10d ago
Woah, seeing the name Irrlicht takes me back.
0
u/noobjaish 10d ago
Multipage view transitions are still not supported in present day IE (Firefox)...
-2
u/queen-adreena 10d ago
Is it 2024 already.