I am trying to animate as ripple effect. It seems to work fine on chrome browser but not working on safari, also I have other animations in the same page that are working fine on chrome and safari both but not this one. I wonder what I am doing wrong.
I tried to debug it and I can see that there is a message in Safari Graphic Tab that says
"This animation has no keyframes"
My css code:
.ripple-animation {
&::after {
@include rings(2s, 40s);
}
&::before {
@include rings(2s, 40s);
}
}
@mixin rings($duration, $delay) {
opacity: 0.5;
// display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
position: absolute;
top: -8px;
left: -10px;
right: 0;
bottom: 0;
content: '';
height: 120%;
width: 110%;
border: 4px solid rgba(0, 0, 0, 0.4);
border-radius: 100%;
-webkit-animation-name: ripple;
-webkit-animation-duration: $duration;
-webkit-animation-delay: $delay;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: cubic-bezier(.65, 0, .34, 1);
animation-name: ripple;
animation-duration: $duration;
animation-delay: $delay;
animation-iteration-count: infinite;
animation-timing-function: cubic-bezier(.65, 0, .34, 1);
}
@-webkit-keyframes ripple {
from {
opacity: 1;
-webkit-transform: scale3d(0.8, 0.8, 0.5);
transform: scale3d(0.8, 0.8, 0.5);
}
to {
opacity: 0;
-webkit-transform: scale3d(1.1, 1.1, 1);
transform: scale3d(1.1, 1.1, 1);
}
}
@keyframes ripple {
from {
opacity: 1;
-webkit-transform: scale3d(0.8, 0.8, 0.5);
transform: scale3d(0.8, 0.8, 0.5);
}
to {
opacity: 0;
-webkit-transform: scale3d(1.1, 1.1, 1);
transform: scale3d(1.1, 1.1, 1);
}
}