replacing js animation to transitions