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
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Template:3DCube/style.css */
/* Template:3DCube/style.css
.scene {
  cc: shorthand term for "CSS Cube", modular and transparent */
width: 200px;
 
height: 200px;
.cc-scene {
margin: 100px auto;
    margin: 25px auto;
position: relative;
}
 
.cc-cube {
    width: 100%;
    height: 100%;
    position: relative;
}
 
.cc-center {
    animation: cc-3DSpin 12s linear infinite;
    width: 100%;
    height: 100%;
}
}


.cube {
.cc-side {
width: 100%;
    position: absolute;
height: 100%;
    width: 100%;
position: relative;
    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;
}
}


.cube-face {
/*
position: absolute;
  Target ONLY the standard MediaWiki image wrappers.
width: 200px;
  This removes white backgrounds on images, but leaves
height: 200px;
  audio/video player buttons safe and visible!
top: 0;
*/
left: 0;
.cc-side a.image,
/* This animation mathematically projects 3D rotation into 2D space */
.cc-side figure {
animation: fake3D 8s linear infinite;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
}


/* Offsetting the start times creates the 4 sides of the 3D box */
/* Ensures images and videos automatically scale to fit the cube */
.face-front { animation-delay: 0s; }
.cc-side img,
.face-right { animation-delay: -2s; }
.cc-side video {
.face-back  { animation-delay: -4s; }
    width: 100%;
.face-left  { animation-delay: -6s; }
    height: 100%;
    object-fit: contain;  
}


/* 16-step sine/cosine projection to simulate flawless 3D spinning */
/* Spin animation */
@keyframes fake3D {
@keyframes cc-3DSpin {
0%      { transform: translateX(0px) scaleX(1); z-index: 4; }
     from { transform: rotate(0deg); }
6.25%  { transform: translateX(38.3px) scaleX(0.924); z-index: 4; }
     to   { transform: rotate(360deg); }
12.5%  { transform: translateX(70.7px) scaleX(0.707); z-index: 4; }
18.75%  { transform: translateX(92.4px) scaleX(0.383); z-index: 3; }
25%     { transform: translateX(100px) scaleX(0); z-index: 3; }
31.25%  { transform: translateX(92.4px) scaleX(-0.383); z-index: 2; }
37.5%  { transform: translateX(70.7px) scaleX(-0.707); z-index: 2; }
43.75%  { transform: translateX(38.3px) scaleX(-0.924); z-index: 1; }
50%     { transform: translateX(0px) scaleX(-1); z-index: 1; }
56.25%  { transform: translateX(-38.3px) scaleX(-0.924); z-index: 1; }
62.5%   { transform: translateX(-70.7px) scaleX(-0.707); z-index: 2; }
68.75%  { transform: translateX(-92.4px) scaleX(-0.383); z-index: 2; }
75%    { transform: translateX(-100px) scaleX(0); z-index: 3; }
81.25%  { transform: translateX(-92.4px) scaleX(0.383); z-index: 3; }
87.5%  { transform: translateX(-70.7px) scaleX(0.707); z-index: 4; }
93.75%  { transform: translateX(-38.3px) scaleX(0.924); z-index: 4; }
100%    { transform: translateX(0px) scaleX(1); z-index: 4; }
}
}


/* Top/Bottom are hidden as 2D math cannot fake diagonal tumbling */
/* Optional text styling */
.face-top, .face-bottom {
.cc-text {
display: none;
    margin: 0;
    font-family: 'Georgia', serif;
    font-size: 3em;
    line-height: 1;
    font-weight: bold;
}
}

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;
}