Template:TextAnimations/styles.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
@keyframes wave { | @keyframes wave { | ||
0%, 100% { top: 0; } | 0%, 100% { top: 0; } | ||
50% { top: - | 50% { top: -4px; } /* Lower height */ | ||
} | } | ||
| Line 11: | Line 11: | ||
/* 2. Formatting & Container Styles */ | /* 2. Formatting & Container Styles */ | ||
.text-animation-container { | .text-animation-container { | ||
display: inline !important; | display: inline !important; | ||
| Line 19: | Line 18: | ||
} | } | ||
/* | /* Base properties for all animated letters */ | ||
.text-animation-container span { | .text-animation-container span { | ||
display: inline-block !important; | display: inline-block !important; | ||
| Line 26: | Line 25: | ||
} | } | ||
/* | /* Effects: Targeting both the word and individual letters */ | ||
.force-glow, .force-glow span { | .force-glow, .force-glow span { | ||
text-shadow: 0 0 5px currentColor, 0 0 10px currentColor !important; | text-shadow: 0 0 5px currentColor, 0 0 10px currentColor !important; | ||
| Line 43: | Line 42: | ||
} | } | ||
/* 3. | /* 3. Animation Assignments */ | ||
.wavy span { | .wavy span { | ||
animation: wave | animation: wave 2s ease-in-out infinite !important; /* Slower speed */ | ||
} | } | ||
| Line 53: | Line 52: | ||
.wavy.rainbow span { | .wavy.rainbow span { | ||
animation: wave | animation: wave 2s ease-in-out infinite, hue-cycle 3s linear infinite !important; | ||
} | } | ||
| Line 69: | Line 68: | ||
html body .wavy span { | html body .wavy span { | ||
animation-name: wave !important; | animation-name: wave !important; | ||
animation-duration: | animation-duration: 2s !important; | ||
} | } | ||
html body .rainbow span { | html body .rainbow span { | ||
| Line 77: | Line 76: | ||
html body .wavy.rainbow span { | html body .wavy.rainbow span { | ||
animation-name: wave, hue-cycle !important; | animation-name: wave, hue-cycle !important; | ||
animation-duration: | animation-duration: 2s, 3s !important; | ||
} | } | ||
} | } | ||
Revision as of 16:57, 16 March 2026
/* 1. Base Keyframes */
@keyframes wave {
0%, 100% { top: 0; }
50% { top: -4px; } /* Lower height */
}
@keyframes hue-cycle {
from { filter: hue-rotate(0deg); }
to { filter: hue-rotate(360deg); }
}
/* 2. Formatting & Container Styles */
.text-animation-container {
display: inline !important;
white-space: nowrap;
padding: 2px 4px;
border-radius: 3px;
}
/* Base properties for all animated letters */
.text-animation-container span {
display: inline-block !important;
position: relative !important;
background: transparent !important;
}
/* Effects: Targeting both the word and individual letters */
.force-glow, .force-glow span {
text-shadow: 0 0 5px currentColor, 0 0 10px currentColor !important;
}
.force-shadow, .force-shadow span {
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) !important;
}
.force-bold, .force-bold span {
font-weight: bold !important;
}
.force-italic, .force-italic span {
font-style: italic !important;
}
/* 3. Animation Assignments */
.wavy span {
animation: wave 2s ease-in-out infinite !important; /* Slower speed */
}
.rainbow span {
animation: hue-cycle 3s linear infinite !important;
}
.wavy.rainbow span {
animation: wave 2s ease-in-out infinite, hue-cycle 3s linear infinite !important;
}
/* 4. Full Override Styles (MediaWiki Reset Fix) */
@media (prefers-reduced-motion: reduce) {
html body .wavy span,
html body .rainbow span,
html body .wavy.rainbow span {
animation-iteration-count: infinite !important;
animation-play-state: running !important;
display: inline-block !important;
position: relative !important;
}
html body .wavy span {
animation-name: wave !important;
animation-duration: 2s !important;
}
html body .rainbow span {
animation-name: hue-cycle !important;
animation-duration: 3s !important;
}
html body .wavy.rainbow span {
animation-name: wave, hue-cycle !important;
animation-duration: 2s, 3s !important;
}
}