tooltip
tooltip copied to clipboard
Move from transitions to animations
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.
I'm curious as to why you feel like animations are better than transitions in this case?
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.