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:3DCube/style.css: Difference between revisions

From SNCApedia, the shit nobody cares about encyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Template:3DCube/style.css
/* Template:3DCube/style.css
   2D matrix simulation of a rotating 3D cube
   cc: shorthand term for "CSS Cube", modular and transparent */
  No 3D CSS properties — sanitizer safe */


.scene {
.cc-scene {
     width: 200px;
     margin: 25px auto;
     height: 200px;
}
     margin: 120px auto;
 
.cc-cube {
     width: 100%;
     height: 100%;
     position: relative;
     position: relative;
}
}


.cube {
.cc-center {
    animation: cc-3DSpin 12s linear infinite;
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
    position: relative;
}
}


.cube-face {
.cc-side {
     position: absolute;
     position: absolute;
     width: 200px;
     width: 100%;
     height: 200px;
     height: 100%;
     top: 0;
   
     left: 0;
    background-color: transparent;  
     transform-origin: 50% 50%;
     outline: 1px solid rgba(200, 200, 200, 0.5);  
     overflow: hidden;
      
     background: transparent;
    display: flex;
     justify-content: center;
     align-items: center;
     text-align: center;
}
}


/* Force images to fill each face */
/*  
.cube-face img {
  Target ONLY the standard MediaWiki image wrappers.
     display: block;
  This removes white backgrounds on images, but leaves
    width: 200px !important;
  audio/video player buttons safe and visible!
     height: 200px !important;
*/
.cc-side a.image,
.cc-side figure {
     background: transparent !important;
     background-color: transparent !important;
     border: none !important;
     border: none !important;
     outline: none !important;
     box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
}


/* z-index steps are set per keyframe as discrete jumps
/* Ensures images and videos automatically scale to fit the cube */
  so faces stack correctly as they rotate into view */
.cc-side img,
 
.cc-side video {
.face-front  { animation: wall-front  8s linear infinite; }
     width: 100%;
.face-right  { animation: wall-right  8s linear infinite; }
     height: 100%;
.face-back  { animation: wall-back  8s linear infinite; }
     object-fit: contain;  
.face-left  { animation: wall-left  8s linear infinite; }
.face-top    { z-index: 4; animation: face-top    8s linear infinite; }
.face-bottom { z-index: 0; animation: face-bottom 8s linear infinite; }
 
@keyframes wall-front {
    0%    { transform: matrix(1,    0,      0, 0.866,    0,   50); z-index: 6; }
    12.5% { transform: matrix(0.707, -0.354, 0, 0.866,  70.7, 35.4); z-index: 5; }
    25%  { transform: matrix(0,    -0.5,  0, 0.866,  100,  0);  z-index: 3; }
    37.5% { transform: matrix(-0.707,-0.354, 0, 0.866,  70.7,-35.4); z-index: 2; }
     50%  { transform: matrix(-1,    0,    0, 0.866,    0,  -50);  z-index: 1; }
    62.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7,-35.4); z-index: 2; }
    75%  { transform: matrix(0,      0.5,  0, 0.866, -100,  0);  z-index: 3; }
    87.5% { transform: matrix(0.707,  0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
    100%  { transform: matrix(1,      0,    0, 0.866,    0,  50);  z-index: 6; }
}
 
@keyframes wall-right {
    0%    { transform: matrix(0,    -0.5,  0, 0.866,  100,    0);  z-index: 3; }
    12.5% { transform: matrix(-0.707,-0.354,0, 0.866,  70.7,-35.4); z-index: 2; }
    25%  { transform: matrix(-1,    0,    0, 0.866,    0,  -50);  z-index: 1; }
    37.5% { transform: matrix(-0.707,0.354, 0, 0.866,  -70.7,-35.4); z-index: 2; }
     50%  { transform: matrix(0,    0.5,  0, 0.866, -100,    0);  z-index: 3; }
    62.5% { transform: matrix(0.707, 0.354, 0, 0.866,  -70.7, 35.4); z-index: 5; }
    75%  { transform: matrix(1,    0,    0, 0.866,    0,  50);  z-index: 6; }
     87.5% { transform: matrix(0.707,-0.354, 0, 0.866,  70.7, 35.4); z-index: 5; }
    100%  { transform: matrix(0,    -0.5,  0, 0.866,  100,    0);  z-index: 3; }
}
 
@keyframes wall-back {
    0%    { transform: matrix(-1,    0,    0, 0.866,    0,  -50);  z-index: 1; }
    12.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7,-35.4); z-index: 2; }
    25%  { transform: matrix(0,      0.5,  0, 0.866, -100,  0);  z-index: 3; }
    37.5% { transform: matrix(0.707,  0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
    50%  { transform: matrix(1,      0,    0, 0.866,    0,  50);  z-index: 6; }
    62.5% { transform: matrix(0.707, -0.354, 0, 0.866,  70.7, 35.4); z-index: 5; }
    75%  { transform: matrix(0,    -0.5,  0, 0.866,  100,  0);  z-index: 3; }
    87.5% { transform: matrix(-0.707,-0.354, 0, 0.866,  70.7,-35.4); z-index: 2; }
    100%  { transform: matrix(-1,    0,    0, 0.866,    0,  -50);  z-index: 1; }
}
 
@keyframes wall-left {
    0%    { transform: matrix(0,    0.5,  0, 0.866, -100,  0);  z-index: 3; }
    12.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
    25%  { transform: matrix(1,    0,    0, 0.866,    0,  50);  z-index: 6; }
    37.5% { transform: matrix(0.707,-0.354, 0, 0.866,  70.7, 35.4); z-index: 5; }
    50%  { transform: matrix(0,    -0.5,  0, 0.866,  100,  0);  z-index: 3; }
    62.5% { transform: matrix(-0.707,-0.354,0, 0.866,  70.7,-35.4); z-index: 2; }
    75%  { transform: matrix(-1,    0,    0, 0.866,    0,  -50);  z-index: 1; }
    87.5% { transform: matrix(-0.707,0.354, 0, 0.866, -70.7,-35.4); z-index: 2; }
    100%  { transform: matrix(0,    0.5,  0, 0.866, -100,  0);  z-index: 3; }
}
}


@keyframes face-top {
/* Spin animation */
    0%    { transform: matrix(1,    0,      0.707, 0.354,  0, -86.6); }
@keyframes cc-3DSpin {
    12.5% { transform: matrix(0.707,-0.354,  0.707, 0.354,  0, -86.6); }
     from { transform: rotate(0deg); }
    25%  { transform: matrix(0,    -0.5,    1,    0,      0, -86.6); }
     to   { transform: rotate(360deg); }
    37.5% { transform: matrix(-0.707,-0.354, 0.707,-0.354,  0, -86.6); }
    50%  { transform: matrix(-1,    0,      0,    -0.5,    0, -86.6); }
    62.5% { transform: matrix(-0.707,0.354, -0.707,-0.354,  0, -86.6); }
     75%  { transform: matrix(0,    0.5,  -1,    0,      0, -86.6); }
     87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354,   0, -86.6); }
    100%  { transform: matrix(1,    0,      0.707, 0.354,  0, -86.6); }
}
}


@keyframes face-bottom {
/* Optional text styling */
     0%    { transform: matrix(1,    0,      0.707, 0.354,  0, 86.6); }
.cc-text {
     12.5% { transform: matrix(0.707,-0.354,  0.707, 0.354,  0, 86.6); }
     margin: 0;
    25%  { transform: matrix(0,   -0.5,    1,    0,      0, 86.6); }
     font-family: 'Georgia', serif;
     37.5% { transform: matrix(-0.707,-0.354, 0.707,-0.354,  0, 86.6); }
     font-size: 3em;
    50%  { transform: matrix(-1,    0,      0,    -0.5,    0, 86.6); }
     line-height: 1;
     62.5% { transform: matrix(-0.707,0.354, -0.707,-0.354,  0, 86.6); }
     font-weight: bold;
    75%  { transform: matrix(0,    0.5,  -1,    0,      0, 86.6); }
     87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354,  0, 86.6); }
    100%  { transform: matrix(1,    0,      0.707, 0.354,  0, 86.6); }
}
}

Latest revision as of 21:00, 13 April 2026

/* Template:3DCube/style.css
   cc: shorthand term for "CSS Cube", modular and transparent */

.cc-scene {
    margin: 25px auto;
}

.cc-cube {
    width: 100%;
    height: 100%;
    position: relative;
}

.cc-center {
    animation: cc-3DSpin 12s linear infinite;
    width: 100%;
    height: 100%;
}

.cc-side {
    position: absolute;
    width: 100%;
    height: 100%;
    
    background-color: transparent; 
    outline: 1px solid rgba(200, 200, 200, 0.5); 
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 
  Target ONLY the standard MediaWiki image wrappers.
  This removes white backgrounds on images, but leaves 
  audio/video player buttons safe and visible! 
*/
.cc-side a.image,
.cc-side figure {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensures images and videos automatically scale to fit the cube */
.cc-side img,
.cc-side video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

/* Spin animation */
@keyframes cc-3DSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Optional text styling */
.cc-text {
    margin: 0;
    font-family: 'Georgia', serif;
    font-size: 3em;
    line-height: 1;
    font-weight: bold;
}