Template:3DOneFace/styles.css: Difference between revisions
From SNCApedia, the shit nobody cares about encyclopedia
Jump to navigationJump to search
SomebodyRum (talk | contribs) mNo edit summary |
SomebodyRum (talk | contribs) mNo edit summary |
||
| Line 1: | Line 1: | ||
@keyframes | /* Template:3DOneFace/style.css | ||
Single face left-to-right swing based on 3DCube */ | |||
.cc-scene { | |||
margin: 25px auto; | |||
} | |||
.cc-cube { | |||
width: 100%; | |||
height: 100%; | |||
position: relative; | |||
} | |||
.cc-center { | |||
animation: cc-Swing 4s ease-in-out infinite; | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.cc-side { | |||
position: absolute; | |||
width: 100%; | |||
height: 100%; | |||
background-color: transparent; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
text-align: center; | |||
} | |||
/* Pause and snap to center on hover */ | |||
.cc-scene:hover .cc-center { | |||
animation-play-state: paused; | |||
transform: rotate(0deg); | |||
transition: transform 0.2s ease-out; | |||
} | |||
/* Clean up image backgrounds */ | |||
.cc-side a.image, | |||
.cc-side figure { | |||
background: transparent !important; | |||
border: none !important; | |||
box-shadow: none !important; | |||
padding: 0 !important; | |||
margin: 0 !important; | |||
} | |||
.cc-side img, | |||
.cc-side video { | |||
width: 100%; | |||
height: 100%; | |||
object-fit: contain; | |||
} | |||
/* The actual swing limits. Uses standard 2D rotate to pass validation! */ | |||
@keyframes cc-Swing { | |||
0% { transform: rotate(-45deg); } | |||
50% { transform: rotate(45deg); } | |||
100% { transform: rotate(-45deg); } | |||
} | } | ||
@media (prefers-reduced-motion: reduce) { | |||
. | .cc-center { animation: none; } | ||
} | } | ||
Revision as of 16:55, 18 April 2026
/* Template:3DOneFace/style.css
Single face left-to-right swing based on 3DCube */
.cc-scene {
margin: 25px auto;
}
.cc-cube {
width: 100%;
height: 100%;
position: relative;
}
.cc-center {
animation: cc-Swing 4s ease-in-out infinite;
width: 100%;
height: 100%;
}
.cc-side {
position: absolute;
width: 100%;
height: 100%;
background-color: transparent;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
/* Pause and snap to center on hover */
.cc-scene:hover .cc-center {
animation-play-state: paused;
transform: rotate(0deg);
transition: transform 0.2s ease-out;
}
/* Clean up image backgrounds */
.cc-side a.image,
.cc-side figure {
background: transparent !important;
border: none !important;
box-shadow: none !important;
padding: 0 !important;
margin: 0 !important;
}
.cc-side img,
.cc-side video {
width: 100%;
height: 100%;
object-fit: contain;
}
/* The actual swing limits. Uses standard 2D rotate to pass validation! */
@keyframes cc-Swing {
0% { transform: rotate(-45deg); }
50% { transform: rotate(45deg); }
100% { transform: rotate(-45deg); }
}
@media (prefers-reduced-motion: reduce) {
.cc-center { animation: none; }
}