Debug panel

Close debug panel
Roma’s Unpolished Posts

Scroll-Driven Animations in Stable Chrome

Published on:
Categories:
CSS 55
Current music:
Mammal Hands — Floating World
Current drink:
White tea with litchi, pineapple, mango, and papaya

Before my first experiments with anchor positioning, I had not previously written about non-production experimental things. I’m usually very practice-oriented and like to play with things that I can just go and put into production. However, a lot of new CSS developments sounded too tasty to leave aside, and when playing with things, I found out that I have a lot to say and contribute.

While there is a long road ahead for anchor positioning itself, I did end up writing three articles about scroll-driven animations while they were being developed in Chrome Canary, describing a number of practical techniques:

  1. Future CSS: Wishes Granted by Scroll-driven Animations
  2. Fit-to-Width Text 
  3. Position-Driven Styles

I did start playing with them when they were under an experimental flag and continued when they were moved outside of it and planned for an eventual release. There were a lot of things I had to adapt to and change in my experiments through the implementation and specs changes — one of the aspects when you touch experimental stuff.

But I’m very happy with what I managed to achieve in my experiments.

Now, starting from Chrome 115, almost all of these experiments actually work in stable Chrome (outside one experiment using timeline-scope)!

That is a bit of a weird feeling. I did come up with a number of experimental techniques that have now become real:

How cool is it not only to get the new CSS spec’s implementation into a stable browser, but to already have a bunch of techniques to apply?

Of course, there is still a need to wait until other browsers pick up scroll-driven animations, but things seem to be positive: WebKit seems to be in support of it, and it sounds like Mozilla has already started working on the implementation. That means that, unless done with extreme care, we shouldn’t use these techniques in production.

But there is one place where we could already start playing with the scroll-driven animations: CSS overrides for sites that you look at in Chrome. That sounds like a good place where the low browser support won’t matter much, so keep that in mind: we can now tweak styles with scroll-driven animations!

Please share your thoughts about this on Mastodon!