Jump to content

Template:TextAnimations/styles.css: Difference between revisions

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


@keyframes jolt-shake {
@keyframes jolt-buzz {
   0%   { transform: translate(0, 0); }
   0%, 100% { transform: translateY(0); }
  20% { transform: translate(-0.5px, 1px); }
   25%     { transform: translateY(-1.5px); }
   40% { transform: translate(-0.5px, -1px); }
   75%     { transform: translateY(1.5px); }
   60% { transform: translate(0.5px, 1px); }
  80%  { transform: translate(0.5px, -1px); }
  100% { transform: translate(0, 0); }
}
}


/* 2. Container & Spans - Vital for MediaWiki */
/* 2. Container & Spans - Vital for MediaWiki */
.text-animation-container {
.text-animation-container {
   display: inline !important;
   display: inline-block !important;
   white-space: pre-wrap !important; /* Preserves spaces */
   white-space: pre !important;  
}
}


Line 35: Line 32:
.rainbow span { animation: hue-cycle 3s linear infinite !important; color: #ff0000 !important; }
.rainbow span { animation: hue-cycle 3s linear infinite !important; color: #ff0000 !important; }
.jolt span {
.jolt span {
   animation: jolt-shake 0.8s linear infinite !important;
  /* High speed (0.2s) creates the "electric" vibration feel */
   animation: jolt-buzz 0.2s linear infinite !important;
   display: inline-block !important;
   display: inline-block !important;
  /* Ensure no horizontal shifting occurs */
  margin: 0 !important;
  padding: 0 !important;
}
}



Revision as of 20:25, 17 March 2026

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

@keyframes hue-cycle {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

@keyframes jolt-buzz {
  0%, 100% { transform: translateY(0); }
  25%      { transform: translateY(-1.5px); }
  75%      { transform: translateY(1.5px); }
}

/* 2. Container & Spans - Vital for MediaWiki */
.text-animation-container {
  display: inline-block !important;
  white-space: pre !important; 
}

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

/* 3. The Effects */
.wavy span    { animation: wave 2.5s ease-in-out infinite !important; }
.rainbow span { animation: hue-cycle 3s linear infinite !important; color: #ff0000 !important; }
.jolt span {
  /* High speed (0.2s) creates the "electric" vibration feel */
  animation: jolt-buzz 0.2s linear infinite !important;
  display: inline-block !important;
  /* Ensure no horizontal shifting occurs */
  margin: 0 !important; 
  padding: 0 !important;
}

/* Combined Effects */
.wavy.rainbow span { animation: wave 2.5s ease-in-out infinite, hue-cycle 3s linear infinite !important; }

/* 4. Formatting Utilities */
.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; }