UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

85 lines (69 loc) 1.91 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: Kick out * Filename: ca__KickOut.ca__fx-css */ .ca__fx-kickOutBehind { animation-name: kickOutBehind; transform-origin: top; backface-visibility: var(--cssanimation-backface-visibility); transform-style: var(--cssanimation-transform-style); will-change: var(--cssanimation-will-change); animation-timing-function: cubic-bezier(0, 0.ca__fx-9, 0.ca__fx-7, 1.ca__fx-45); } @keyframes kickOutBehind { 0% { transform: rotate(0deg); } 40% { transform: rotate(45deg); } 100% { transform: rotate(0deg); } } .ca__fx-kickOutFront { animation-name: kickOutFront; backface-visibility: var(--cssanimation-backface-visibility); transform-style: var(--cssanimation-transform-style); will-change: var(--cssanimation-will-change); transform-origin: top; animation-timing-function: cubic-bezier(0, 0.ca__fx-9, 0.ca__fx-7, 1.ca__fx-45); } @keyframes kickOutFront { 0% { transform: rotate(0deg); } 40% { transform: rotate(-45deg); } 100% { transform: rotate(0deg); } }