Move flickering transition to CSS for performance reasons.