News for hackers. Stuff that matters.

Ask HN: Native CSS timeline is here, are you switching?

With the new animation-timeline, scroll-timeline and other new CSS properties it's possible now to build amazing animations without stutter.

We have never been able to achieve great performance with JS simply because JS thread always gets blocked in the worst possible moment.

Obviously these properties are too new and not supported across enough browsers to use them without fallbacks, but who is building a something that allows to use them and then fall back for unsupported browsers?

Here are some examples for inspiration:

https://x.com/paul_uiux/status/1841437472711938322

https://x.com/jh3yy/status/1831428806151958876

https://x.com/jh3yy/status/1833663719466836224

https://x.com/jh3yy/status/1836380999644504486

( 2 comments | 5 points | on HN )
Re:Ask HN: Native CSS timeline is here, are you switching? by 1GZ0 on Wednesday October 16, 2024 @06:09AM (#41857381)
Its a bit early to start using this in products (see: https://caniuse.com/?search=css-scroll-timeline)

But once its baseline I'll absolutely use it, anything to ship less javascript.

Re:Ask HN: Native CSS timeline is here, are you switching? by oleg009 on Wednesday October 16, 2024 @09:11AM (#41858695)
The point of this question is why we can't start using it now with a fallback that does the same thing but with JS.

Why should chromium users wait? very soon majority of the users will have that feature, why should they keep getting less performant and often stuttering animations via JS libraries?