3 ms·
I'd argue that most simple UI animations are in fact presentational, not behavioral. One of the nice things about defining animations declaratively in CSS inst
by modeless 17y ago
I'd argue that most simple UI animations are in fact presentational, not behavioral.
One of the nice things about defining animations declaratively in CSS instead of procedurally in Javascript is that browsers will have control over the implementation. Your browser could easily have a "no animations" mode, or selectively disable certain animation types. Browsers can implement animations much more efficiently if they don't have to call Javascript every frame, and they can also separate animation from whatever else the page is doing; animations could be slowed or stopped in background tabs or low-battery situations while the page's Javascript continues running.
- vidarh 17y agoNot to mention that it'll do wonders for keeping pages accessible where we'd otherwise risk people making them a mess of javascript...