Jump to content

Template:TextAnimations/styles.css: Difference between revisions

From FC1
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* 1. Base Keyframes */
/* 1. Base Keyframes - Shallow 2px lift */
@keyframes wave {
@keyframes wave {
   0%, 100% { top: 0; }
   0%, 100% { top: 0; }
   50%      { top: -6px; }
   50%      { top: -2px; }  
}
}


Line 11: Line 11:


/* 2. Formatting & Container Styles */
/* 2. Formatting & Container Styles */
/* 'inline' ensures it stays inside sentences without breaking into a new paragraph */
.text-animation-container {
.text-animation-container {
   display: inline !important;
   display: inline !important;
Line 19: Line 18:
}
}


/* The letters MUST be inline-block to allow the 'top' property to animate */
.text-animation-container span {
.text-animation-container span {
   display: inline-block !important;
   display: inline-block !important;
  position: relative !important;
  background: transparent !important;
}
}


.force-glow span {
.force-glow, .force-glow span {
   filter: drop-shadow(0 0 5px currentColor) !important;
   text-shadow: 0 0 5px currentColor, 0 0 10px currentColor !important;
}
}


.force-shadow span {
.force-shadow, .force-shadow span {
   filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5)) !important;
   text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) !important;
}
}


.force-bold,  
.force-bold, .force-bold span {
.force-bold span {
   font-weight: bold !important;
   font-weight: bold !important;
}
}


.force-italic,  
.force-italic, .force-italic span {
.force-italic span {
   font-style: italic !important;
   font-style: italic !important;
}
}
Line 44: Line 42:
/* 3. Standard Animation Styles */
/* 3. Standard Animation Styles */
.wavy span {  
.wavy span {  
  display: inline-block !important;
   animation: wave 3s ease-in-out infinite !important;  
  position: relative !important;
   animation: wave 1s ease-in-out infinite !important;  
}
}


.rainbow span {  
.rainbow span {  
  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;
   animation: wave 2.5s ease-in-out infinite, hue-cycle 3s linear infinite !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) */
/* 4. Full Override Styles (MediaWiki Reset Fix) */
@media (prefers-reduced-motion: reduce) {
@media (prefers-reduced-motion: reduce) {
   html body .wavy span,
   html body .wavy span,
Line 70: Line 63:
     position: relative !important;
     position: relative !important;
   }
   }
 
   html body .wavy span {  
   html body .wavy span {  
    animation-name: wave !important;  
animation-name: wave !important;  
    animation-duration: 1s !important;  
animation-duration: 3s !important;  
   }
   }
   html body .rainbow span {  
   html body .rainbow span {  
Line 81: Line 73:
   html body .wavy.rainbow span {  
   html body .wavy.rainbow span {  
     animation-name: wave, hue-cycle !important;  
     animation-name: wave, hue-cycle !important;  
     animation-duration: 1s, 3s !important;
     animation-duration: 2.5s, 3s !important;
   }
   }
}
}

Latest revision as of 17:57, 16 March 2026

/* 1. Base Keyframes - Shallow 2px lift */
@keyframes wave {
  0%, 100% { top: 0; }
  50%      { top: -2px; } 
}

@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;
}

.text-animation-container span {
  display: inline-block !important;
  position: relative !important;
  background: transparent !important;
}

.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. Standard Animation Styles */
.wavy span { 
  animation: wave 3s ease-in-out infinite !important; 
}

.rainbow span { 
  animation: hue-cycle 3s linear infinite !important; 
}

.wavy.rainbow span {
  animation: wave 2.5s 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: 3s !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: 2.5s, 3s !important;
  }
}