Comment

Comment by aerotwist

That's not quite true. Using a CSS transition on left, top, width etc requires a trip to the main thread, so it's no better of worse to do it with CSS than JavaScript. It is bad in both cases and should be avoided.

Equally animating transform and opacity changes with JS or CSS is normally the same. The only time we can do compositor only is when it's something like an infinite animation of something like a transform; that can be done without hitting the main thread. That rarely happens in real life though. Most apps and sites have way more complex anims going on.

parent aerotwist 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton