Template:TextAnimations/styles.css
Appearance
/* 1. Base Keyframes (Available to everyone) */
@keyframes wave {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-6px); }
}
@keyframes hue-cycle {
from { filter: hue-rotate(0deg); }
to { filter: hue-rotate(360deg); }
}
/* Standard Styles */
.wavy span {
animation: wave 1s ease-in-out infinite;
animation-delay: inherit;
}
.rainbow span {
animation: hue-cycle 3s linear infinite;
animation-delay: inherit;
}
.wavy.rainbow span {
/* Wave MUST be first to match JS order */
animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite;
animation-delay: inherit;
}
/* Override Styles (Reduced Motion) */
@media (prefers-reduced-motion: reduce) {
html body .wavy span {
animation: wave 1s ease-in-out infinite !important;
animation-delay: inherit !important;
}
html body .rainbow span {
animation: hue-cycle 3s linear infinite !important;
animation-delay: inherit !important;
}
html body .wavy.rainbow span {
animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite !important;
animation-delay: inherit !important;
}
}