UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

118 lines (95 loc) 2.07 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: Heartbeat * Filename: ca__Heartbeat.ca__fx-css */ .ca__fx-heartbeatSlow { animation-name: heartbeatSlow; animation-duration: 0.ca__fx-5s; animation-iteration-count: var(--cssanimation-infinite); } @keyframes heartbeatSlow { 0%, 100% { transform: scale(1); } 35%, 65% { transform: scale(1.ca__fx-2); } } .ca__fx-heartbeatFast { animation-name: heartbeatFast; animation-iteration-count: var(--cssanimation-infinite); } @keyframes heartbeatFast { 0%, 28%, 70%, 100% { transform: scale(1); } 14%, 42% { transform: scale(1.ca__fx-3); } } .ca__fx-elasticPulse { animation: elasticPulse var(--duration, 1.ca__fx-2s) ease-in-out infinite; } @keyframes elasticPulse { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.ca__fx-1); } 60% { transform: scale(0.ca__fx-95); } } .ca__fx-pulseShake { animation-name: pulseShake; animation-iteration-count: infinite; } @keyframes pulseShake { 90% { transform: scale(1); } 92% { transform: scale(1.ca__fx-2); } 96% { transform: scale(1, 1); } 98% { transform: scale(1.ca__fx-1); } }