Template:TextAnimations/styles.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
. | /* 1. Base Keyframes */ | ||
@keyframes wave { | |||
0%, 100% { top: 0; } | |||
50% { top: -6px; } | |||
} | } | ||
@keyframes hue-cycle { | |||
from { filter: hue-rotate(0deg); } | |||
to { filter: hue-rotate(360deg); } | |||
} | } | ||
/* | /* 2. Formatting & Container Styles */ | ||
.text-animation-container { | .text-animation-container { | ||
display: inline-block; | display: inline-block; | ||
} | } | ||
.force-bold, | |||
.force-bold span { | |||
font-weight: bold !important; | |||
} | } | ||
.force-italic, | |||
.force-italic span { | |||
font-style: italic !important; | |||
} | } | ||
/* Standard Styles */ | /* 3. Standard Animation Styles */ | ||
.wavy span { | .wavy span { | ||
display: inline-block !important; | display: inline-block !important; | ||
| Line 33: | Line 35: | ||
display: inline-block !important; | display: inline-block !important; | ||
animation: hue-cycle 3s linear infinite !important; | animation: hue-cycle 3s linear infinite !important; | ||
} | } | ||
| Line 46: | Line 43: | ||
} | } | ||
/* | /* 4. Override Styles (Reduced Motion / MediaWiki Reset Fix) */ | ||
@media (prefers-reduced-motion: reduce) { | @media (prefers-reduced-motion: reduce) { | ||
html body .wavy span, | html body .wavy span, | ||
Revision as of 08:08, 14 March 2026
/* 1. Base Keyframes */
@keyframes wave {
0%, 100% { top: 0; }
50% { top: -6px; }
}
@keyframes hue-cycle {
from { filter: hue-rotate(0deg); }
to { filter: hue-rotate(360deg); }
}
/* 2. Formatting & Container Styles */
.text-animation-container {
display: inline-block;
}
.force-bold,
.force-bold span {
font-weight: bold !important;
}
.force-italic,
.force-italic span {
font-style: italic !important;
}
/* 3. Standard Animation Styles */
.wavy span {
display: inline-block !important;
position: relative !important;
animation: wave 1s ease-in-out infinite !important;
}
.rainbow span {
display: inline-block !important;
animation: hue-cycle 3s linear infinite !important;
}
.wavy.rainbow span {
display: inline-block !important;
position: relative !important;
animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite !important;
}
/* 4. Override Styles (Reduced Motion / 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: 1s !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: 1s, 3s !important;
}
}