modified CSS to fix transition in Safari