tooltip icon indicating copy to clipboard operation
tooltip copied to clipboard

Move from transitions to animations

Open darsain opened this issue 10 years ago • 3 comments

CSS animations have 90%+ support right now, and they would make life quite easier, and API cleaner.

The cons are none, as animation support is the same as transition support. I don't even know why I went with transitions. I guess it seemed simpler from styling perspective, but it's definitely not the right tool for this job.

darsain avatar Mar 06 '15 12:03 darsain

I'm curious as to why you feel like animations are better than transitions in this case?

kmiyashiro avatar Aug 05 '15 19:08 kmiyashiro

Not really performance. I had a styles & script structure that would make animations implementation simpler than transitions.

But I think I'm gonna re-evaluate this issue. I've since realized that animations have one very bad side effect: if you change state of the element mid transition (like hiding an element that is just animating in and vice versa), transitions are able to just pick up from the current position and animate back seamlessly. Animations start from the beginning of their defined keyframes, leading to something that would be perceived as stuttering, which is not acceptable.

Unless there is a way how to do that via animation direction or some other CSS properties. Dunno, will have to research that.

I'm gonna leave this issue open as a reminder that I still need to rework transitions. I don't like how they are implemented right now.

darsain avatar Aug 08 '15 14:08 darsain