UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

68 lines (57 loc) 1.48 kB
/*! * Module: glitchSliceInCollapse Animation * Usage: <div class="cssanimation ca__fx-glitchSliceInCollapse">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-glitchSliceInCollapse { animation-name: glitchSliceInCollapse; animation-timing-function: steps(5 end); } @keyframes glitchSliceInCollapse { 0% { opacity: 0; transform: scaleY(0); clip-path: inset(100% 0 0 0); } 40% { transform: scaleY(0.6); clip-path: inset(60% 0 10% 0); } 70% { transform: scaleY(0.9); clip-path: inset(20% 0 20% 0); } 100% { opacity: 1; transform: scaleY(1); clip-path: inset(0 0 0 0); } }