Pinned
Martin Trapp
Martin Trapp
@martr.app
Maintainer at @astro.build 🚀 Maker of 👜 Bags of Tricks ✨for view transitions @vtbag.dev
494 followers158 following392 posts
When those become available in all browsers we can finally get Astro‘s transition:persist natively on the web platform! Shout out to @fancypenguin.party, who envisioned and built this years ago 🫡
Blink: Intent to Prototype: Persistent Widgets
Martin Trapp reposted
This is huge for MPAs. Once these features are Baseline, they’ll make a hell of a difference. The initial proposal is open for feedback, so don’t miss your chance to influence where it goes next.
One of the things that we at Chrome have been thinking about is a way to do declarative route and navigation matching **in CSS**. Together with @nomster.bsky.social and @dbaron.org I’ve been working on it for the past few months, and next week we’ll be presenting our work at the CSSWG F2F meeting.
Many thanks, @pablolarah.bsky.social, for the kind shout out and for sharing vtbag.dev with your followers. Your support means a lot and helps more developers discover these View Transition resources. It is greatly appreciated!
💼 The Bag of Tricks for View Transitions by @vtbag.dev Tools, Tips, and Tricks to Enhance your Dev Skills with the View Transition API! #ViewTransitions #webdev #css vtbag.dev
As an alternative to mapping routes and matching paths, you can define the view transition type directly where it happens: on the link. I adapted the Chrome DevRel demo to use @vtbag/turn-signal/link-types 👨🔧 Same result, just a different way of thinking about it. vtbag.dev/navigation-t...
Here's that directional View Transitions demo we talked about over lunch, @twnsnd.com chrome.dev/view-transit... The toolkit automatically injects from-<name> and to-<name> View Transition Types based on navigation origin and destination. The routes are defined in a routemap.
As always, the Bag's got you covered: vtbag.dev/basics/pseud...
Fact! And I got to learn and write on ::view-transition-group-children the other day alongside view-transition-group CSS property coming soon. Brandi has really done a lot on View Transitions and I am grateful for his work. Thank you for your early contribution to it. The web is a wonderful place
Martin Trapp reposted
The View Transition API is getting more forgiving: in future, duplicate view transition names will no longer cancel your animation. The API will sweep them aside, give you a nudge in the console, and carry on with the uniquely named elements. Catch all the recent changes on The Bag’s API page:
Little moment of joy today: Web Weekly #190 includes a reference to vtbag.dev! Seeing your own project pop up in a newsletter you genuinely enjoy reading is such a lovely surprise. Made my day. Vielen Dank! 😊
Web Weekly 190 just went out! 🥂 This one covers `image-set` for backgrounds, Wakamai Fondue v1.0, `field-sizing` for textareas, selects and input fields, CSS quirks in the shadow DOM, and container style queries in Firefox Nightly. Read it online: https://webweekly.email/...
As a reply to an original post by @joyofcode.xyz that neatly shows the different stages of getting aspect ratio right in text-morphing view transitions, and to a brilliant article by @jakearchibald.com that explains it all in great depth with lots of fun.
That excellent article from Jake was written over two years ago. I also reference it here as part of the Fun With View Transitions series: vtbag.dev/fwvt/healing...
Martin Trapp reposted
Replying to @stefanjudis.com
If you enjoy @Bramus' View Transitions Toolbox, you should definitely also take a look at @vtbag.dev Utensil-Drawer: vtbag.dev/tools/utensi...
Great result! Love seeing Astro + Svelte working so nicely together. As for the vtbag.dev part: it was actually the other way round: From @fubits.dev I learned that trick of not redefining swap(), but executing the swap directly in the astro:before-swap event listener.
The first @astro.build v6 + Svelte 5 website I’m happy to ship to production. Prelim. result of migrating a „historically grown“ content-heavy website (500+ routes). We tried to tackle to complexity by nesting & some shallow routing trickery I owe to @vtbag.dev. Really grateful for Server Islands 🙏
Martin Trapp reposted
Replying to @kevinpowell.co
It would be nice if sibling-index could enumerate the position of pseudo elements. There is not much use in indexing ::before and ::after but I would have plenty of use cases for ::view-transition-group(*), especially in combination with nested view transition groups or scoped view transitions.
Chapeau and h/t to you. 🎩👏✨ I hope you enjoy your well deserved time off! The lovely thing is that, despite the sadness that you will no longer be the guardian and champion of the Astro Docs, most the replies carry a sense of gratitude and fond memories.
And with that, so ends my last day w Astro Docs. So proud of the docs our community made, & honoured I had the chance to lead them. Open to new adventures in docs/community. If you liked learning, using, or contributing to Astro...maybe some of that was me! Maybe I can bring that to your project!
@sarah11918.rainsberger.ca I think it is wonderful that Astro will not lose you entirely, and I am already looking forward to your “see you later” in the March newsletter. 😊
Martin Trapp reposted
If you like Adam's article, you might also want to have a look at vtbag.dev/vector-demo/ and fun-with-view-transitions.pages.dev/episode/7/page
how to make #CSS view transitions swoop or have motion blur or how I learned to help view transitions not always go in straight lines ⤷ nerdy.dev/swoop-there-...
Martin Trapp reposted
Sarah and Yan are both absolutely incredible people to have in your team and are a massive part of Astro's success. If you're looking to make your docs better, you'd be missing the opportunity of your life by not hiring them!
There are some great people, @yanthomas.dev included, looking for their next adventure! Oh hey, and me included, too! I'm not in a rush, but keeping my eye out for the right opportunity in docs or community leadership. If you've liked using or contributing to Astro, maybe part of that came from me!
==> SPREAD THE WORD Hands-on tutorial for mastering View Transitions! Seven interactive exercises guide you from basics to advanced techniques: morphing snapshots, healing text, and more. Code at github.com/vtbag/fun-wi..., Episodes on vtbag.dev/fwvt/welcome/
Martin Trapp reposted
It crashed often, but it was still a lot of fun back then. Just a handful of tags, no CSS, no scripts.
Happy 35th Birthday WorldWideWeb – the first browser! On December 25, 1990, at CERN, a British physicist and internet pioneer Tim Berners-Lee created the world's first web browser, called WorldWideWeb. Try the browser emulator worldwideweb.cern.ch/browser/ #InternetHistory
Happens to the best, @nerdy.dev 😃 One way or the other.
what is the longest you have tried to debug a view transition before you realized that you had typed view-timeline-name?
Let's open today's window on the Advent calendar! @jp-knj.bsky.social writes about the different ways @astro.build and @nextjs.org have chosen to integrate view transitions:
Martin Trapp reposted
Replying to @vtbag.dev
Often it is better to reuse the built-in fade animations from the user agent stylesheet (-ua-view-transition-fade-in, -ua-view-transition-fade-out) rather than define your own: vtbag.dev/tips/over-ex...
Cool for many other things too, but especially cool for cross-document view transitions: finally you can tell front ⏩ from back ⏪! Honestly, trying to replace the default cross-fade with directional animations without the Navigation API is a bit like driving without turn signals.
This API is SOOOOOOO good … can't wait for it! 🤩 I'm using it on some demos over at view-transitions.chrome.dev. Get the details about this API at developer.chrome.com/docs/web-pla...
Cool for many other things too, but especially cool for cross-document view transitions: finally you can tell front ⏩ from back ⏪! Honestly, trying to replace the default cross-fade with directional animations without the Navigation API is a bit like driving without turn signals.
This API is SOOOOOOO good … can't wait for it! 🤩 I'm using it on some demos over at view-transitions.chrome.dev. Get the details about this API at developer.chrome.com/docs/web-pla...
If you build with Astro (@astro.build), my last post might sound strange to you. But don’t forget, there are plenty of poor souls out there who only know native view transitions. ;-)
They have no idea how nice it is that Astro, from the very first version of its client router, could automatically tell the difference between forward and backward navigation. Big shout-out to @fancypenguin.party, @natemoo.re, and @FredKSchott for gifting us view transitions in Astro 30 months ago!
A truly passionate article from someone who genuinely loves view transitions and knows exactly how to use them in a way that really supports the user experience, not just for the sake of the effect.
View transitions are pretty neat, and I was fortunate enough to write a piece for @piccalil.li about putting them to work. They're such an exciting new part of the web platform, and I'm elated to see new and boundary-pushing effects making their way into production. #WebDev #ViewTransitions #CSS
Now everyone’s posting CSS view transition beginner guides, huh? Time to bring back a classic. It’s not just about @view-transition, it also covers reduced motion prefs, the need for global styling, and, most importantly, introduces you to render blocking. Episode One of Fun With View Transitions!
Martin Trapp reposted
___ 👉 When view transitions fail *only* on mobile, you know the universe is testing you. 📱🐛🌌
It seems to fix the issue...right after I've opened a bug on chromium 😅 Should this still be considered a bug?
Quite a lot has happened in the View Transition spec this month! Check out the recent changes at vtbag.dev/basics/api/#...
It still feels like magic every time: with just Level 1 of the View Transition API, the <ClientRouter> brings cross-document view transitions to your Astro JS site. Dive into this new article in The Bag to celebrate Firefox joining the party!
And a friendly heads-up: Turning your MPA into a SPA can change how your page state and scripts behave. After adding the client router, give your site a quick check. If some scripts need a little kick after navigation, Astro's lifecycle events are ready to help.
If you liked the video, you might also enjoy clicking through the CodePen: codepen.io/martrapp/pen...
As of today, every major browser supports Level 1 of the View Transition API! To celebrate, here is a short video freshly captured in Firefox 144.
When you scroll down on vtbag.dev, you can find a few view transition demos at the bottom of the navigation sidebar that work perfectly even in Firefox v144. Now guess which ones?
Martin Trapp reposted
Martin Trapp reposted
Wow, hard to believe this was made over 2 years ago! Just tweak some CSS properties and let the browser figure out the transition. Why don’t we see animations like this on more websites by now?
Have you seen www.bram.us/2023/05/09/r...? Extend it with a MutationObserver (or StyleObserver) and you can have it auto-transition :)
Martin Trapp reposted