Use CSS transitions instead of JS