Jump to content

Template:TextAnimations/styles.css: Difference between revisions

From FC1
No edit summary
No edit summary
Line 10: Line 10:
}
}


/* 2. Standard Styles (For users with animations ENABLED) */
/* Standard Styles */
.wavy span {
.wavy span {  
  display: inline-block;
   animation: wave 1s ease-in-out infinite;  
   animation: wave 1s ease-in-out infinite;
   animation-delay: inherit;  
   animation-delay: inherit;
}
}
 
.rainbow span {  
.rainbow span {
   animation: hue-cycle 3s linear infinite;  
   animation: hue-cycle 3s linear infinite;
   animation-delay: inherit;  
   animation-delay: inherit;
}
}
.wavy.rainbow span {
.wavy.rainbow span {
   display: inline-block;
   /* Wave MUST be first to match JS order */
   animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite;
   animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite;
   animation-delay: inherit;
   animation-delay: inherit;
}
}


/* 3. Override Styles (For users with animations DISABLED) */
/* Override Styles (Reduced Motion) */
@media (prefers-reduced-motion: reduce) {
@media (prefers-reduced-motion: reduce) {
   html body .wavy span {
   html body .wavy span {  
    display: inline-block !important;
     animation: wave 1s ease-in-out infinite !important;  
     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: hue-cycle 3s linear infinite !important;  
     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;
     animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite !important;
     animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite !important;
     animation-delay: inherit !important;
     animation-delay: inherit !important;
   }
   }
}
}

Revision as of 07:07, 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); }
}

/* Standard Styles */
.wavy span { 
  animation: wave 1s ease-in-out infinite; 
  animation-delay: inherit; 
}
.rainbow span { 
  animation: hue-cycle 3s linear infinite; 
  animation-delay: inherit; 
}
.wavy.rainbow span {
  /* Wave MUST be first to match JS order */
  animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite;
  animation-delay: inherit;
}

/* Override Styles (Reduced Motion) */
@media (prefers-reduced-motion: reduce) {
  html body .wavy span { 
    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 {
    animation: wave 1s ease-in-out infinite, hue-cycle 3s linear infinite !important;
    animation-delay: inherit !important;
  }
}