Hi!
How could I set the "left" CSS property to "auto" within anime js?
Thanks!
Hey,
You can't, _anime_ needs at least one digit in the value parameters in order to work.
Try calculating the value in JS instead of using auto.
Hmm could I possibly add a class to the element on a 'complete' callback?
Yes you can add a class on a complete callback, but I'm not sure to understand how this will help you animating to auto
@dpw1 has a good point. Animating to an "auto" value could be very handy in Anime. Consider a use case like jQuery's slideDown() animation, where an element's height is animated from 0 to "auto" without having to show the element and manually calculate it's final height before hiding again and animating - very cumbersome!
Most helpful comment
@dpw1 has a good point. Animating to an
"auto"value could be very handy in Anime. Consider a use case like jQuery'sslideDown()animation, where an element's height is animated from0to"auto"without having to show the element and manually calculate it's final height before hiding again and animating - very cumbersome!