Hi there!
I am just looking into ways to animate things without using position absolute and left and right properties.
with flex I can center something in the middle of the page very easily. How would I go about animating something from right to center but not using position absolute?
Cheers
You can't animate most flexbox values because they're words, e.g. flex-start, space-around, column-reverse. You can't say, animate to column reverse. The browser has to do the layout. But that's actually a good thing as that's one less thing you have to calculate.
To do a flexbox animations, start off by recording the position of your element in it's current state. Now change its flexbox style and let the browser reposition it. Now record the new position of your element. You now kno