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
Tag: Manual revert
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Template:3DCube/styles.css
/* Template:3DCube/style.css
   Hardware-accelerated 2D matrix simulation of a 3D cube.
   cc: shorthand term for "CSS Cube", modular and transparent */
  Fully compatible with MediaWiki CSS sanitizers. */


.mw-3dcube-scene {
.cc-scene {
     width: 200px;
    margin: 25px auto;
     height: 200px;
}
 
.cc-cube {
     width: 100%;
     height: 100%;
     position: relative;
     position: relative;
    /* Scaling is handled inline by the template */
}
}


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


.mw-3dcube-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-color: transparent;
    display: flex;
     justify-content: center;
     align-items: center;
     text-align: center;
}
}


/* Force inner images to perfectly fill the face */
/*  
.mw-3dcube-face img {
  Target ONLY the standard MediaWiki image wrappers.
     display: block;
  This removes white backgrounds on images, but leaves
    width: 100% !important;
  audio/video player buttons safe and visible!
     height: 100% !important;
*/
.cc-side a.image,
.cc-side figure {
     background: transparent !important;
     background-color: transparent !important;
     border: none !important;
     border: none !important;
     object-fit: cover;
     box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
}


/* Base animations */
/* Ensures images and videos automatically scale to fit the cube */
.mw-3dcube-front  { animation: mw-3dcube-front  8s linear infinite; }
.cc-side img,
.mw-3dcube-right  { animation: mw-3dcube-right  8s linear infinite; }
.cc-side video {
.mw-3dcube-back  { animation: mw-3dcube-back  8s linear infinite; }
     width: 100%;
.mw-3dcube-left  { animation: mw-3dcube-left  8s linear infinite; }
     height: 100%;
.mw-3dcube-top    { animation: mw-3dcube-top    8s linear infinite; z-index: 4; }
     object-fit: contain;  
.mw-3dcube-bottom { animation: mw-3dcube-bottom 8s linear infinite; z-index: 0; }
 
/* Optional: pause rotation on hover */
.mw-3dcube-scene:hover .mw-3dcube-face { animation-play-state: paused; }
 
/* --- Orthographic 2D Matrix Keyframes --- */
@keyframes mw-3dcube-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 mw-3dcube-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 mw-3dcube-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 mw-3dcube-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 mw-3dcube-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 mw-3dcube-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;
}