UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

311 lines (263 loc) 6.17 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: Moon Fade * Filename: ca__MoonFade.ca__fx-css */ .ca__fx-moonFade { animation-name: moonFade; animation-duration: 2s; animation-timing-function: ease-out; will-change: transform, opacity; } @keyframes moonFade { 0% { opacity: 0; filter: brightness(0.ca__fx-3) blur(4px); transform: scale(0.ca__fx-95); } 100% { opacity: 1; filter: none; transform: scale(1); } } .ca__fx-moonFadeUp { animation-name: moonFadeUp; animation-duration: 2s; animation-timing-function: ease-out; will-change: transform, opacity; } @keyframes moonFadeUp { 0% { transform: translateY(20%) scale(0.ca__fx-95); opacity: 0; filter: brightness(0.ca__fx-4) blur(6px); } 100% { transform: translateY(0%) scale(1); opacity: 1; filter: none; } } .ca__fx-moonFadeDown { animation-name: moonFadeDown; animation-duration: 1.ca__fx-8s; animation-timing-function: ease-out; will-change: transform, opacity; } @keyframes moonFadeDown { 0% { transform: translateY(-20%) scale(1.ca__fx-05); opacity: 0; filter: brightness(0.ca__fx-4) blur(6px); } 100% { transform: translateY(0%) scale(1); opacity: 1; filter: none; } } .ca__fx-moonFadeLeft { animation: moonFadeLeft 2s ease-out both; will-change: transform, opacity; } @keyframes moonFadeLeft { 0% { transform: translateX(-30%) scale(0.ca__fx-95); opacity: 0; filter: brightness(0.ca__fx-4) blur(5px); } 100% { transform: translateX(0%) scale(1); opacity: 1; filter: none; } } .ca__fx-moonFadeRight { animation: moonFadeRight 2s ease-out both; will-change: transform, opacity; } @keyframes moonFadeRight { 0% { transform: translateX(30%) scale(0.ca__fx-95); opacity: 0; filter: brightness(0.ca__fx-4) blur(5px); } 100% { transform: translateX(0%) scale(1); opacity: 1; filter: none; } } .ca__fx-moonFadeScaleUp { animation: moonFadeScaleUp 2.ca__fx-1s ease-out both; will-change: transform, opacity; } @keyframes moonFadeScaleUp { 0% { transform: scale(0.ca__fx-85); opacity: 0; filter: brightness(0.ca__fx-3) blur(6px); } 100% { transform: scale(1); opacity: 1; filter: none; } } .ca__fx-moonFadeSlow { animation: moonFadeSlow 3.ca__fx-5s ease-out both; will-change: transform, opacity; } @keyframes moonFadeSlow { 0% { transform: scale(0.ca__fx-9); opacity: 0; filter: brightness(0.ca__fx-25) blur(8px); } 100% { transform: scale(1); opacity: 1; filter: none; } } .ca__fx-moonFadeStrong { animation: moonFadeStrong 1.ca__fx-5s ease-out both; will-change: transform, opacity; } @keyframes moonFadeStrong { 0% { transform: scale(1.ca__fx-1) rotate(-2deg); opacity: 0; filter: brightness(0.ca__fx-2) blur(12px); } 100% { transform: scale(1) rotate(0deg); opacity: 1; filter: none; } } .ca__fx-moonFadeOut { animation-name: moonFadeOut; animation-duration: 2s; animation-timing-function: ease-out; will-change: transform, opacity; } @keyframes moonFadeOut { 0% { opacity: 1; filter: none; transform: scale(1); } 100% { opacity: 0; filter: brightness(0.ca__fx-3) blur(4px); transform: scale(0.ca__fx-95); } } .ca__fx-moonFadeOutUp { animation: moonFadeOutUp 1.ca__fx-6s ease-in both; will-change: transform, opacity; } @keyframes moonFadeOutUp { 0% { opacity: 1; transform: translateY(0%) scale(1); filter: none; } 100% { opacity: 0; transform: translateY(-30%) scale(0.ca__fx-9); filter: brightness(0.ca__fx-4) blur(8px); } } .ca__fx-moonFadeOutDown { animation: moonFadeOutDown 1.ca__fx-6s ease-in both; will-change: transform, opacity; } @keyframes moonFadeOutDown { 0% { opacity: 1; transform: translateY(0%) scale(1); filter: none; } 100% { opacity: 0; transform: translateY(30%) scale(0.ca__fx-9); filter: brightness(0.ca__fx-4) blur(8px); } } .ca__fx-moonFadeOutLeft { animation: moonFadeOutLeft 1.ca__fx-5s ease-in both; will-change: transform, opacity; } @keyframes moonFadeOutLeft { 0% { opacity: 1; transform: translateX(0%) scale(1); filter: none; } 100% { opacity: 0; transform: translateX(-30%) scale(0.ca__fx-9); filter: brightness(0.ca__fx-4) blur(6px); } } .ca__fx-moonFadeOutRight { animation: moonFadeOutRight 1.ca__fx-5s ease-in both; will-change: transform, opacity; } @keyframes moonFadeOutRight { 0% { opacity: 1; transform: translateX(0%) scale(1); filter: none; } 100% { opacity: 0; transform: translateX(30%) scale(0.ca__fx-9); filter: brightness(0.ca__fx-4) blur(6px); } } .ca__fx-moonFadeOutScale { animation: moonFadeOutScale 1.ca__fx-7s ease-in both; will-change: transform, opacity; } @keyframes moonFadeOutScale { 0% { transform: scale(1); opacity: 1; filter: none; } 100% { transform: scale(0.ca__fx-85); opacity: 0; filter: brightness(0.ca__fx-2) blur(10px); } }