Template:TextAnimations/styles.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Base Keyframes */ | /* 1. Base Keyframes (Available to everyone) */ | ||
@keyframes wave { | @keyframes wave { | ||
0%, 100% { transform: translateY(0); } | 0%, 100% { transform: translateY(0); } | ||
| Line 10: | Line 10: | ||
} | } | ||
/* | /* 2. Standard Styles (For users with animations ENABLED) */ | ||
.wavy span { | .wavy span { | ||
display: inline-block; | display: inline-block; | ||
animation | animation: wave 1s ease-in-out infinite; | ||
animation-delay: inherit; | |||
animation- | |||
} | } | ||
.rainbow span { | .rainbow span { | ||
animation | animation: hue-cycle 3s linear infinite; | ||
animation-delay: inherit; | |||
animation- | |||
} | } | ||
.wavy.rainbow span { | .wavy.rainbow span { | ||
display: inline-block; | display: inline-block; | ||
animation | animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite; | ||
animation-delay: inherit; | |||
animation- | |||
} | } | ||
/* 3. Override Styles (For users with animations DISABLED) */ | |||
@media (prefers-reduced-motion: reduce) { | @media (prefers-reduced-motion: reduce) { | ||
html body .wavy span { | html body .wavy span { | ||
display: inline-block !important; | display: inline-block !important; | ||
animation | animation: wave 1s ease-in-out infinite !important; | ||
animation-delay: inherit !important; | animation-delay: inherit !important; | ||
} | } | ||
html body .rainbow span { | html body .rainbow span { | ||
animation | animation: hue-cycle 3s linear infinite !important; | ||
animation-delay: inherit !important; | animation-delay: inherit !important; | ||
} | } | ||
html body .wavy.rainbow span { | html body .wavy.rainbow span { | ||
display: inline-block !important; | display: inline-block !important; | ||
animation | animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite !important; | ||
animation-delay: inherit !important; | animation-delay: inherit !important; | ||
} | } | ||
} | } | ||
Revision as of 06:59, 14 March 2026
/* 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); }
}
/* 2. Standard Styles (For users with animations ENABLED) */
.wavy span {
display: inline-block;
animation: wave 1s ease-in-out infinite;
animation-delay: inherit;
}
.rainbow span {
animation: hue-cycle 3s linear infinite;
animation-delay: inherit;
}
.wavy.rainbow span {
display: inline-block;
animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite;
animation-delay: inherit;
}
/* 3. Override Styles (For users with animations DISABLED) */
@media (prefers-reduced-motion: reduce) {
html body .wavy span {
display: inline-block !important;
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 {
display: inline-block !important;
animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite !important;
animation-delay: inherit !important;
}
}