UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

298 lines (264 loc) 3.93 kB
.cssanimation { animation-duration: var(--cssanimation-duration, 1s); animation-fill-mode: var(--cssanimation-fill-mode, both); } .cssanimation span { display: var(--cssanimation-display, inline-block); } .infinite { animation-iteration-count: var(--cssanimation-infinite, infinite) !important; } @media (prefers-reduced-motion: reduce) { .cssanimation, .cssanimation span { animation: none !important; transition: none !important; } } :root { --cssanimation-duration: 1s; --cssanimation-fill-mode: both; --cssanimation-infinite: infinite; --cssanimation-backface-visibility: hidden; --cssanimation-transform-style: preserve-3d; --cssanimation-will-change: transform, opacity; --cssanimation-display: inline-block; --move-distance: -800px; } /** * Module: Shake * Filename: ca__Shake.ca__fx-css */ .ca__fx-horizontalShake { animation-name: horizontalShake; animation-iteration-count: infinite; } @keyframes horizontalShake { 3%, 12%, 21%, 30%, 39%, 48%, 57%, 65%, 74%, 83%, 92% { transform: translateX(5px); } 6%, 15%, 24%, 33%, 42%, 51%, 60%, 68%, 77%, 86%, 95% { transform: translateX(3px); } 9%, 18%, 27%, 36%, 45%, 54%, 63%, 71%, 80%, 89%, 98% { transform: translateX(-5px); } } .ca__fx-verticalShake { animation-name: verticalShake; animation-iteration-count: infinite; } @keyframes verticalShake { 3%, 12%, 21%, 30%, 39%, 48%, 57%, 65%, 74%, 83%, 92% { transform: translateY(5px); } 6%, 15%, 24%, 33%, 42%, 51%, 60%, 68%, 77%, 86%, 95% { transform: translateY(3px); } 9%, 18%, 27%, 36%, 45%, 54%, 63%, 71%, 80%, 89%, 98% { transform: translateY(-5px); } } .ca__fx-madMax { animation-name: madMax; animation-iteration-count: infinite; } @keyframes madMax { 3%, 12%, 21%, 30%, 39%, 48%, 57%, 65%, 74%, 83%, 92% { transform: translateY(5px) scale(1.ca__fx-1); } 6%, 15%, 24%, 33%, 42%, 51%, 60%, 68%, 77%, 86%, 95% { transform: translateY(3px) scale(0.ca__fx-8); } 9%, 18%, 27%, 36%, 45%, 54%, 63%, 71%, 80%, 89%, 98% { transform: translateY(-5px) scale(1.ca__fx-1); } } .ca__fx-coolHorizontalShake { animation-name: coolHorizontalShake; animation-iteration-count: infinite; } @keyframes coolHorizontalShake { 3%, 21%, 39%, 57%, 74%, 92% { transform: translateX(5px); } 6%, 24%, 42%, 60%, 77%, 95% { transform: translateX(3px); } 9%, 27%, 45%, 63%, 80%, 98% { transform: translateX(-5px); } } .ca__fx-coolVerticalShake { animation-name: coolVerticalShake; animation-iteration-count: infinite; } @keyframes coolVerticalShake { 3%, 21%, 39%, 57%, 74%, 92% { transform: translateY(5px); } 6%, 24%, 42%, 60%, 77%, 95% { transform: translateY(3px); } 9%, 27%, 45%, 63%, 80%, 98% { transform: translateY(-5px); } } .ca__fx-quietMad { animation-name: quietMad; animation-iteration-count: infinite; } @keyframes quietMad { 3%, 21%, 39%, 57%, 74%, 92% { transform: translateY(5px) scale(1.ca__fx-1); } 6%, 24%, 42%, 60%, 77%, 95% { transform: translateY(3px) scale(0.ca__fx-8); } 9%, 27%, 45%, 63%, 80%, 98% { transform: translateY(-5px) scale(1.ca__fx-1); } } .ca__fx-vibration { animation: vibration 0.ca__fx-1s linear infinite; } @keyframes vibration { 50% { transform: skewY(1deg) skewX(-1deg) scale(1.ca__fx-06); } }