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
3D cube first version css
 
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Template:3DCube/style.css */
/* Template:3DCube/style.css
/* Rewritten to use whitelisted 2D transforms so MediaWiki accepts it */
  cc: shorthand term for "CSS Cube", modular and transparent */


.scene {
.cc-scene {
width: 200px;
    margin: 25px auto;
height: 200px;
margin: 100px auto;
}
}


.cube {
.cc-cube {
width: 100%;
    width: 100%;
height: 100%;
    height: 100%;
position: relative;
    position: relative;
/* transform-style: preserve-3d is banned by MW, using a 2D animation instead */
animation: spin-and-pulse 6s linear infinite;
}
}


.cube-face {
.cc-center {
position: absolute;
    animation: cc-3DSpin 12s linear infinite;
width: 200px;
    width: 100%;
height: 200px;
    height: 100%;
top: 0;
left: 0;
}
}


/* We hide all faces except the front one since it's flattened to 2D */
.cc-side {
.face-back, .face-right, .face-left, .face-top, .face-bottom {
    position: absolute;
display: none;
    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;
}
}


/* Whitelisted keyframes for animation */
/*  
@keyframes spin-and-pulse {
  Target ONLY the standard MediaWiki image wrappers.
0% { transform: rotate(0deg) scale(1); }
  This removes white backgrounds on images, but leaves
50% { transform: rotate(180deg) scale(0.8); }
  audio/video player buttons safe and visible!
100% { transform: rotate(360deg) scale(1); }
*/
.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;
}
}

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