Template:TextAnimations/styles.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
50% { top: -6px; } | 50% { top: -6px; } | ||
} | } | ||
@keyframes hue-cycle { | @keyframes hue-cycle { | ||
from { filter: hue-rotate(0deg); } | from { filter: hue-rotate(0deg); } | ||
| Line 10: | Line 9: | ||
} | } | ||
/* 2. Formatting | /* 2. Container & Formatting */ | ||
.text-animation-container { | .text-animation-container { | ||
display: inline !important; | display: inline !important; | ||
| Line 19: | Line 17: | ||
} | } | ||
/* | /* Updated: These now target the word AND the letters */ | ||
. | .force-bold, .force-bold span { font-weight: bold !important; } | ||
.force-italic, .force-italic span { font-style: italic !important; } | |||
} | |||
.force-glow span { | /* Glow: Multi-layered for maximum 'pop' */ | ||
.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; | ||
} | } | ||
.force-shadow span { | /* Shadow: Soft drop shadow */ | ||
.force-shadow, .force-shadow span { | |||
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) !important; | text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) !important; | ||
} | } | ||
/* 3. Animation Logic */ | |||
/* 3. | |||
.wavy span { | .wavy span { | ||
display: inline-block !important; | display: inline-block !important; | ||
| Line 51: | Line 37: | ||
animation: wave 1s ease-in-out infinite !important; | animation: wave 1s ease-in-out infinite !important; | ||
} | } | ||
.rainbow span { | .rainbow span { | ||
display: inline-block !important; | display: inline-block !important; | ||
animation: hue-cycle 3s linear infinite !important; | animation: hue-cycle 3s linear infinite !important; | ||
} | } | ||
.wavy.rainbow span { | .wavy.rainbow span { | ||
display: inline-block !important; | display: inline-block !important; | ||
| Line 63: | Line 47: | ||
} | } | ||
/* 4. | /* Ensure letters stay transparent to show background */ | ||
.text-animation-container span { | |||
display: inline-block !important; | |||
background: none !important; | |||
} | |||
/* 4. Reduced Motion */ | |||
@media (prefers-reduced-motion: reduce) { | @media (prefers-reduced-motion: reduce) { | ||
html body .wavy span, | html body .wavy span, html body .rainbow span { | ||
animation-iteration-count: infinite !important; | animation-iteration-count: infinite !important; | ||
animation-play-state: running !important; | animation-play-state: running !important; | ||
} | } | ||
} | } | ||
Revision as of 16:41, 16 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. Container & Formatting */
.text-animation-container {
display: inline !important;
white-space: nowrap;
padding: 2px 4px;
border-radius: 3px;
}
/* Updated: These now target the word AND the letters */
.force-bold, .force-bold span { font-weight: bold !important; }
.force-italic, .force-italic span { font-style: italic !important; }
/* Glow: Multi-layered for maximum 'pop' */
.force-glow, .force-glow span {
text-shadow: 0 0 5px currentColor, 0 0 10px currentColor !important;
}
/* Shadow: Soft drop shadow */
.force-shadow, .force-shadow span {
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) !important;
}
/* 3. Animation Logic */
.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;
}
/* Ensure letters stay transparent to show background */
.text-animation-container span {
display: inline-block !important;
background: none !important;
}
/* 4. Reduced Motion */
@media (prefers-reduced-motion: reduce) {
html body .wavy span, html body .rainbow span {
animation-iteration-count: infinite !important;
animation-play-state: running !important;
}
}