New mission: revamp the portals to make them look actually tolerable to the eye. They are currently placeholders as of now.
The Gold Network: Soyworld | SNCApedia | SoyPlace


I'm not dead, just inactive for the moment. Faggot (talk) 20:16, 9 April 2026 (UTC)

Template:DecryptText/styles.css: Difference between revisions

From SNCApedia, the shit nobody cares about encyclopedia
Jump to navigationJump to search
Created page with "Template:DecryptText/styles.css Hover-to-decrypt text effect with a "trigger once" delay trick: .dec-scene { display: inline-block; position: relative; vertical-align: bottom; cursor: default; } The real text defines the bounding box of the container: .dec-real { display: inline; } The mask overlays absolutely, cropping to the exact size of the real text: .dec-mask { position: absolute; top: 0; left: 0; right: 0; bottom: 0..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
/* Template:DecryptText/styles.css
/* Template:DecryptText/styles.css
   Hover-to-decrypt text effect with a "trigger once" delay trick */
   Left-to-Right sweeping Matrix/Hacker decrypt effect */


.dec-scene {
.dtxt-scene {
     display: inline-block;
     display: inline-block;
     position: relative;
     position: relative;
Line 9: Line 9:
}
}


/* The real text defines the bounding box of the container */
.dtxt-real {
.dec-real {
     display: inline-block;
     display: inline;
    visibility: hidden;
    clip-path: inset(0 100% 0 0);  
}
}


/* The mask overlays absolutely, cropping to the exact size of the real text */
.dtxt-mask {
.dec-mask {
     position: absolute;
     position: absolute;
     top: 0; left: 0; right: 0; bottom: 0;
     top: 0; left: 0; bottom: 0;
    width: 100%;
     overflow: hidden;
     overflow: hidden;
    word-break: break-all;
     font-family: 'Courier New', Courier, monospace;
     font-family: 'Courier New', Courier, monospace;
     font-weight: bold;
     font-weight: bold;
     color: inherit;
     color: inherit;
    clip-path: inset(0 0 0 0);
}
.dtxt-scroller {
    display: inline-block;
    white-space: nowrap;
    animation: dtxt-matrix 0.5s steps(1) infinite;
}
}


/* =========================================
/* =========================================
   STATE 1: STAY DECRYPTED (Default)
   STATE 1: STAY DECRYPTED (Default)
  Uses a 9999s delay to permanently "stick"
   ========================================= */
   ========================================= */
.dec-stay .dec-real {
.dtxt-stay .dtxt-real {
    opacity: 0;
     transition: clip-path 0s 9999s, visibility 0s 9999s;
     transition: opacity 0s 9999s; /* Magic trick: wait 9999 seconds to hide */
}
}
.dec-stay:hover .dec-real {
.dtxt-stay:hover .dtxt-real {
     opacity: 1;
     visibility: visible;
     transition: opacity 0.4s 0.1s; /* Appear smoothly after a 0.1s delay */
     clip-path: inset(0 0 0 0);
    transition: clip-path 0.7s linear, visibility 0s;
}
}


.dec-stay .dec-mask {
.dtxt-stay .dtxt-mask {
    opacity: 1;
     transition: clip-path 0s 9999s, opacity 0s 9999s;
     transition: opacity 0s 9999s;
}
}
.dec-stay:hover .dec-mask {
.dtxt-stay:hover .dtxt-mask {
    clip-path: inset(0 0 0 100%);
     opacity: 0;
     opacity: 0;
     animation: dec-scramble 0.3s steps(4);
     transition: clip-path 0.7s linear, opacity 0s 0.7s;
    transition: opacity 0.2s 0.2s; /* Glitches for 0.2s, then fades out */
}
}


Line 51: Line 56:
   STATE 2: REVERT ON MOUSE LEAVE
   STATE 2: REVERT ON MOUSE LEAVE
   ========================================= */
   ========================================= */
.dec-revert .dec-real {
.dtxt-revert .dtxt-real {
    transition: clip-path 0.4s linear, visibility 0s 0.4s;
}
.dtxt-revert:hover .dtxt-real {
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.7s linear, visibility 0s;
}
 
.dtxt-revert .dtxt-mask {
    transition: clip-path 0.4s linear, opacity 0s;
}
.dtxt-revert:hover .dtxt-mask {
    clip-path: inset(0 0 0 100%);
     opacity: 0;
     opacity: 0;
     transition: opacity 0.4s 0.2s; /* Hide smoothly when mouse leaves */
     transition: clip-path 0.7s linear, opacity 0s 0.7s;
}
}
.dec-revert:hover .dec-real {
 
     opacity: 1;
/* =========================================
     transition: opacity 0.4s 0.1s;
  STATE 3: ON LOAD (Auto-Decrypt)
  ========================================= */
.dtxt-load .dtxt-real {
     animation: dtxt-reveal 1.2s linear 0.5s forwards;
}
.dtxt-load .dtxt-mask {
     animation: dtxt-hide 1.2s linear 0.5s forwards;
}
}


.dec-revert .dec-mask {
@keyframes dtxt-reveal {
     opacity: 1;
     0%  { visibility: visible; clip-path: inset(0 100% 0 0); }
     transition: opacity 0.4s 0.2s;
     100% { visibility: visible; clip-path: inset(0 0 0 0); }
}
}
.dec-revert:hover .dec-mask {
@keyframes dtxt-hide {
     opacity: 0;
     0%  { clip-path: inset(0 0 0 0); opacity: 1; }
     animation: dec-scramble 0.3s steps(4);
     99%  { clip-path: inset(0 0 0 100%); opacity: 1; }
     transition: opacity 0.2s 0.2s;
     100% { clip-path: inset(0 0 0 100%); opacity: 0; }
}
}


/* Terminal glitch animation */
/* Character mutation translation */
@keyframes dec-scramble {
@keyframes dtxt-matrix {
     0%  { transform: translate(0, 0); }
     0%  { transform: translateX(0); }
     25%  { transform: translate(-2px, 1px); }
     10%  { transform: translateX(-2ch); }
     50%  { transform: translate(1px, -1px); }
    20%  { transform: translateX(-5ch); }
     75%  { transform: translate(-1px, 2px); }
    30%  { transform: translateX(-1ch); }
     100% { transform: translate(0, 0); }
    40%  { transform: translateX(-6ch); }
     50%  { transform: translateX(-3ch); }
     60%  { transform: translateX(-8ch); }
    70%  { transform: translateX(-4ch); }
    80%  { transform: translateX(-7ch); }
    90%  { transform: translateX(-2ch); }
     100% { transform: translateX(0); }
}
}


@media (prefers-reduced-motion: reduce) {
@media (prefers-reduced-motion: reduce) {
     .dec-stay:hover .dec-mask,  
     .dtxt-scroller { animation: none !important; }
     .dec-revert:hover .dec-mask {
    .dtxt-stay:hover .dtxt-real, .dtxt-stay:hover .dtxt-mask,
         animation: none !important;
     .dtxt-revert:hover .dtxt-real, .dtxt-revert:hover .dtxt-mask,
    .dtxt-load .dtxt-real, .dtxt-load .dtxt-mask {
        transition-duration: 0s !important;
         animation-duration: 0s !important;
     }
     }
}
}

Latest revision as of 13:25, 19 April 2026

/* Template:DecryptText/styles.css
   Left-to-Right sweeping Matrix/Hacker decrypt effect */

.dtxt-scene {
    display: inline-block;
    position: relative;
    vertical-align: bottom;
    cursor: default;
}

.dtxt-real {
    display: inline-block;
    visibility: hidden;
    clip-path: inset(0 100% 0 0); 
}

.dtxt-mask {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 100%;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: inherit;
    clip-path: inset(0 0 0 0); 
}

.dtxt-scroller {
    display: inline-block;
    white-space: nowrap;
    animation: dtxt-matrix 0.5s steps(1) infinite;
}

/* =========================================
   STATE 1: STAY DECRYPTED (Default)
   ========================================= */
.dtxt-stay .dtxt-real {
    transition: clip-path 0s 9999s, visibility 0s 9999s;
}
.dtxt-stay:hover .dtxt-real {
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.7s linear, visibility 0s;
}

.dtxt-stay .dtxt-mask {
    transition: clip-path 0s 9999s, opacity 0s 9999s;
}
.dtxt-stay:hover .dtxt-mask {
    clip-path: inset(0 0 0 100%);
    opacity: 0;
    transition: clip-path 0.7s linear, opacity 0s 0.7s;
}

/* =========================================
   STATE 2: REVERT ON MOUSE LEAVE
   ========================================= */
.dtxt-revert .dtxt-real {
    transition: clip-path 0.4s linear, visibility 0s 0.4s;
}
.dtxt-revert:hover .dtxt-real {
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.7s linear, visibility 0s;
}

.dtxt-revert .dtxt-mask {
    transition: clip-path 0.4s linear, opacity 0s;
}
.dtxt-revert:hover .dtxt-mask {
    clip-path: inset(0 0 0 100%);
    opacity: 0;
    transition: clip-path 0.7s linear, opacity 0s 0.7s;
}

/* =========================================
   STATE 3: ON LOAD (Auto-Decrypt)
   ========================================= */
.dtxt-load .dtxt-real {
    animation: dtxt-reveal 1.2s linear 0.5s forwards;
}
.dtxt-load .dtxt-mask {
    animation: dtxt-hide 1.2s linear 0.5s forwards;
}

@keyframes dtxt-reveal {
    0%   { visibility: visible; clip-path: inset(0 100% 0 0); }
    100% { visibility: visible; clip-path: inset(0 0 0 0); }
}
@keyframes dtxt-hide {
    0%   { clip-path: inset(0 0 0 0); opacity: 1; }
    99%  { clip-path: inset(0 0 0 100%); opacity: 1; }
    100% { clip-path: inset(0 0 0 100%); opacity: 0; }
}

/* Character mutation translation */
@keyframes dtxt-matrix {
    0%   { transform: translateX(0); }
    10%  { transform: translateX(-2ch); }
    20%  { transform: translateX(-5ch); }
    30%  { transform: translateX(-1ch); }
    40%  { transform: translateX(-6ch); }
    50%  { transform: translateX(-3ch); }
    60%  { transform: translateX(-8ch); }
    70%  { transform: translateX(-4ch); }
    80%  { transform: translateX(-7ch); }
    90%  { transform: translateX(-2ch); }
    100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .dtxt-scroller { animation: none !important; }
    .dtxt-stay:hover .dtxt-real, .dtxt-stay:hover .dtxt-mask,
    .dtxt-revert:hover .dtxt-real, .dtxt-revert:hover .dtxt-mask,
    .dtxt-load .dtxt-real, .dtxt-load .dtxt-mask {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}