News for hackers. Stuff that matters.
Re:Show HN: CSS Extras by dleeftink on Tuesday October 14, 2025 @12:43PM (#45582125)
An optimisation I've always wondered about for transforming/translating/animating elements: is it faster to use JS translations or animation API directly on the element (e.g. style.transform / element.animate), or updating CSS variables with JS to let the CSS engine reposition inheriting elements?

In the context of animations, I'd intuit the latter but would be open to hearing why.

Re:Show HN: CSS Extras by Sesse__ on Tuesday October 14, 2025 @01:19PM (#45582544)
You want CSS transitions or animations, since they can run on the compositor thread (most of the time). Zero jank.

(I work with CSS browser performance, although animations is not my primary field)

Re:Show HN: CSS Extras by cluckindan on Tuesday October 14, 2025 @02:37PM (#45583307)
jQuery has .animate() which uses the JS API and used to be very popular. When CSS Animations became available, that part of jQuery became obsolete overnight.