UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

61 lines (50 loc) 1.3 kB
/*! * Module: squishLift Animation * Usage: <div class="cssanimation ca__fx-squishLift">Your Content</div> */ /* stylelint-disable */ :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; } .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; } } /* stylelint-enable */ .ca__fx-squishLift { animation: squishLift var(--duration, 0.8s) ease-in-out both; } @keyframes squishLift { 0% { transform: translateY(0) scaleY(1); } 30% { transform: translateY(-1.2rem) scaleY(1.3); } 60% { transform: translateY(0.5rem) scaleY(0.9); } 100% { transform: translateY(0) scaleY(1); } }