Template:3DOneFace/styles.css: Difference between revisions
From SNCApedia, the shit nobody cares about encyclopedia
Jump to navigationJump to search
SomebodyRum (talk | contribs) testing |
SomebodyRum (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
/* ================================ | /* ================================ | ||
Template:3DOneFace/styles.css | Template:3DOneFace/styles.css | ||
Fake-3D via foreshortening only | |||
2D transforms — MediaWiki safe | |||
================================ */ | ================================ */ | ||
| Line 28: | Line 28: | ||
/* === KEYFRAMES: LOW | /* === KEYFRAMES: LOW === */ | ||
/* subtle tilt, card barely moves away from viewer */ | |||
@keyframes onef-jiggle-low { | @keyframes onef-jiggle-low { | ||
0% { transform: | 0% { transform: scaleX(1) scaleY(1); } | ||
14% { transform: scaleX(0.88) scaleY(0.97); } | |||
30% { transform: scaleX(0.95) scaleY(0.85); } | |||
47% { transform: scaleX(0.82) scaleY(0.93); } | |||
61% { transform: scaleX(0.91) scaleY(0.80); } | |||
78% { transform: scaleX(0.86) scaleY(0.96); } | |||
90% { transform: scaleX(0.93) scaleY(0.88); } | |||
100% { transform: | 100% { transform: scaleX(1) scaleY(1); } | ||
} | } | ||
/* === KEYFRAMES: NORMAL | /* === KEYFRAMES: NORMAL === */ | ||
/* noticeable random tilt in 3D space */ | |||
@keyframes onef-jiggle-normal { | @keyframes onef-jiggle-normal { | ||
0% { transform: | 0% { transform: scaleX(1) scaleY(1); } | ||
11% { transform: scaleX(0.72) scaleY(0.94); } | |||
26% { transform: scaleX(0.90) scaleY(0.65); } | |||
39% { transform: scaleX(0.58) scaleY(0.88); } | |||
54% { transform: scaleX(0.85) scaleY(0.60); } | |||
67% { transform: | 67% { transform: scaleX(0.63) scaleY(0.91); } | ||
81% { transform: scaleX(0.79) scaleY(0.70); } | |||
93% { transform: scaleX(0.55) scaleY(0.86); } | |||
100% { transform: | 100% { transform: scaleX(1) scaleY(1); } | ||
} | } | ||
/* === KEYFRAMES: HIGH | /* === KEYFRAMES: HIGH === */ | ||
/* dramatic tilt, nearly edge-on at times */ | |||
@keyframes onef-jiggle-high { | @keyframes onef-jiggle-high { | ||
0% { transform: | 0% { transform: scaleX(1) scaleY(1); } | ||
9% { transform: | 9% { transform: scaleX(0.45) scaleY(0.92); } | ||
22% { transform: scaleX(0.88) scaleY(0.38); } | |||
36% { transform: scaleX(0.32) scaleY(0.85); } | |||
51% { transform: scaleX(0.80) scaleY(0.30); } | |||
63% { transform: scaleX(0.40) scaleY(0.90); } | |||
77% { transform: scaleX(0.88) scaleY(0.42); } | |||
89% { transform: scaleX(0.35) scaleY(0.82); } | |||
100% { transform: | 100% { transform: scaleX(1) scaleY(1); } | ||
} | } | ||
| Line 76: | Line 79: | ||
.onef-wrapper:hover .onef-face { | .onef-wrapper:hover .onef-face { | ||
animation-play-state: paused; | animation-play-state: paused; | ||
transform: | transform: scaleX(1) scaleY(1); | ||
transition: transform 0.15s ease-out; | transition: transform 0.15s ease-out; | ||
} | } | ||
Revision as of 16:12, 18 April 2026
/* ================================
Template:3DOneFace/styles.css
Fake-3D via foreshortening only
2D transforms — MediaWiki safe
================================ */
/* === CORE === */
.onef-wrapper {
display: inline-block;
vertical-align: middle;
}
.onef-face {
display: inline-block;
animation-name: onef-jiggle-normal;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
/* === INTENSITY LEVELS === */
.onef-low .onef-face { animation-name: onef-jiggle-low; }
.onef-normal .onef-face { animation-name: onef-jiggle-normal; }
.onef-high .onef-face { animation-name: onef-jiggle-high; }
/* === KEYFRAMES: LOW === */
/* subtle tilt, card barely moves away from viewer */
@keyframes onef-jiggle-low {
0% { transform: scaleX(1) scaleY(1); }
14% { transform: scaleX(0.88) scaleY(0.97); }
30% { transform: scaleX(0.95) scaleY(0.85); }
47% { transform: scaleX(0.82) scaleY(0.93); }
61% { transform: scaleX(0.91) scaleY(0.80); }
78% { transform: scaleX(0.86) scaleY(0.96); }
90% { transform: scaleX(0.93) scaleY(0.88); }
100% { transform: scaleX(1) scaleY(1); }
}
/* === KEYFRAMES: NORMAL === */
/* noticeable random tilt in 3D space */
@keyframes onef-jiggle-normal {
0% { transform: scaleX(1) scaleY(1); }
11% { transform: scaleX(0.72) scaleY(0.94); }
26% { transform: scaleX(0.90) scaleY(0.65); }
39% { transform: scaleX(0.58) scaleY(0.88); }
54% { transform: scaleX(0.85) scaleY(0.60); }
67% { transform: scaleX(0.63) scaleY(0.91); }
81% { transform: scaleX(0.79) scaleY(0.70); }
93% { transform: scaleX(0.55) scaleY(0.86); }
100% { transform: scaleX(1) scaleY(1); }
}
/* === KEYFRAMES: HIGH === */
/* dramatic tilt, nearly edge-on at times */
@keyframes onef-jiggle-high {
0% { transform: scaleX(1) scaleY(1); }
9% { transform: scaleX(0.45) scaleY(0.92); }
22% { transform: scaleX(0.88) scaleY(0.38); }
36% { transform: scaleX(0.32) scaleY(0.85); }
51% { transform: scaleX(0.80) scaleY(0.30); }
63% { transform: scaleX(0.40) scaleY(0.90); }
77% { transform: scaleX(0.88) scaleY(0.42); }
89% { transform: scaleX(0.35) scaleY(0.82); }
100% { transform: scaleX(1) scaleY(1); }
}
/* === HOVER: SNAP FLAT === */
.onef-wrapper:hover .onef-face {
animation-play-state: paused;
transform: scaleX(1) scaleY(1);
transition: transform 0.15s ease-out;
}
.onef-nohover:hover .onef-face {
animation-play-state: running;
transform: none;
transition: none;
}
/* === REDUCED MOTION SAFETY === */
@media (prefers-reduced-motion: reduce) {
.onef-face {
animation: none;
transform: none;
}
.onef-wrapper:hover .onef-face {
transform: none;
transition: none;
}
}