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: | ||
/* Template:3DOneFace/style.css | /* Template:3DOneFace/style.css | ||
Single face left-to-right swing | Single face left-to-right swing, inline text friendly */ | ||
.cc-scene { | .cc-scene { | ||
display: inline-block; | |||
vertical-align: middle; | |||
} | } | ||
.cc-cube { | /* Ensure all nested spans flow inline without breaking paragraphs */ | ||
.cc-cube, .cc-center, .cc-side { | |||
display: inline-block; | |||
vertical-align: middle; | |||
} | } | ||
.cc-center { | .cc-center { | ||
animation: cc-Swing 4s ease-in-out infinite; | animation: cc-Swing 4s ease-in-out infinite; | ||
} | } | ||
/* | /* Hovering instantly kills the animation and snaps it flat for reading */ | ||
.cc-scene:hover .cc-center { | .cc-scene:hover .cc-center { | ||
animation | animation: none; | ||
transform: rotate(0deg); | transform: rotate(0deg); | ||
} | } | ||
/* Clean up image backgrounds */ | /* Clean up image backgrounds if an image is used */ | ||
.cc-side a.image, | .cc-side a.image, | ||
.cc-side figure { | .cc-side figure { | ||
| Line 57: | Line 42: | ||
/* The actual swing limits. Uses standard 2D rotate to pass validation! */ | /* The actual swing limits. Uses standard 2D rotate to pass validation! */ | ||
@keyframes cc-Swing { | @keyframes cc-Swing { | ||
0% { transform: rotate(- | 0% { transform: rotate(-35deg); } | ||
50% { transform: rotate( | 50% { transform: rotate(35deg); } | ||
100% { transform: rotate(- | 100% { transform: rotate(-35deg); } | ||
} | } | ||
Revision as of 17:06, 18 April 2026
/* Template:3DOneFace/style.css
Single face left-to-right swing, inline text friendly */
.cc-scene {
display: inline-block;
vertical-align: middle;
}
/* Ensure all nested spans flow inline without breaking paragraphs */
.cc-cube, .cc-center, .cc-side {
display: inline-block;
vertical-align: middle;
}
.cc-center {
animation: cc-Swing 4s ease-in-out infinite;
}
/* Hovering instantly kills the animation and snaps it flat for reading */
.cc-scene:hover .cc-center {
animation: none;
transform: rotate(0deg);
}
/* Clean up image backgrounds if an image is used */
.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(-35deg); }
50% { transform: rotate(35deg); }
100% { transform: rotate(-35deg); }
}
@media (prefers-reduced-motion: reduce) {
.cc-center { animation: none; }
}