Template:Stonecutting/styles.css: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
(Created page with ".stonecutting-carousel { position: relative; } .sc-frame { position: absolute; top: 0; →‎instead of inset:0: right: 0; bottom: 0; left: 0; opacity: 0; animation: sc-cycle 12s linear infinite; } .sc-frame:nth-child(1) { animation-delay: 0s; } .sc-frame:nth-child(2) { animation-delay: 4s; } .sc-frame:nth-child(3) { animation-delay: 8s; } →‎add more nth-child rules if you expect >3 outputs: @keyframes sc-cycle { 0%,20% { opacity: 1; } 30%...")
 
No edit summary
Line 3: Line 3:
}
}


/* every frame sits on top of each other */
.sc-frame {
.sc-frame {
   position: absolute;
   position: absolute;
   top: 0;     /* instead of inset:0 */
   top: 0;
   right: 0;
   right: 0;
   bottom: 0;
   bottom: 0;
   left: 0;
   left: 0;


   opacity: 0;
   opacity: 0;                       /* hidden by default */
   animation: sc-cycle 12s linear infinite;
   animation: sc-cycle 12s steps(1) infinite;
  /* 12 s = 3 frames × 4 s each; adjust if you add more frames + delays    */
}
}


.sc-frame:nth-child(1) { animation-delay: 0s; }
/* delay offsets for the first three frames ─ add more if you need them */
.sc-frame:nth-child(2) { animation-delay: 4s; }
.sc-frame:nth-child(1) { animation-delay: 0s; }
.sc-frame:nth-child(3) { animation-delay: 8s; }
.sc-frame:nth-child(2) { animation-delay: 4s; }
/* add more nth-child rules if you expect >3 outputs */
.sc-frame:nth-child(3) { animation-delay: 8s; }


/* instant on/off – no cross-fade */
@keyframes sc-cycle {
@keyframes sc-cycle {
   0%,20%   { opacity: 1; }
   0%   { opacity: 1; }  /* visible for the first step-interval      */
   30%,100% { opacity: 0; }
  33% { opacity: 1; }   /* stays visible until its time slot ends    */
   34% { opacity: 0; }  /* then snaps off                          */
  100% { opacity: 0; }   /* stays hidden while the other frames show */
}
}


/* slot coordinates are set in the Lua module */
/* slots are placed absolutely by the Lua module */
.sc-slot {
.sc-slot {
   position: absolute;
   position: absolute;

Revision as of 21:33, 13 June 2025

.stonecutting-carousel {
  position: relative;
}

/* every frame sits on top of each other */
.sc-frame {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  opacity: 0;                       /* hidden by default */
  animation: sc-cycle 12s steps(1) infinite;
  /* 12 s = 3 frames × 4 s each; adjust if you add more frames + delays     */
}

/* delay offsets for the first three frames ─ add more if you need them */
.sc-frame:nth-child(1) { animation-delay: 0s;  }
.sc-frame:nth-child(2) { animation-delay: 4s;  }
.sc-frame:nth-child(3) { animation-delay: 8s;  }

/* instant on/off – no cross-fade */
@keyframes sc-cycle {
  0%   { opacity: 1; }   /* visible for the first step-interval       */
  33%  { opacity: 1; }   /* stays visible until its time slot ends    */
  34%  { opacity: 0; }   /* then snaps off                           */
  100% { opacity: 0; }   /* stays hidden while the other frames show */
}

/* slots are placed absolutely by the Lua module */
.sc-slot {
  position: absolute;
  width: 32px;
  height: 32px;
}