Created
September 4, 2020 08:06
-
-
Save joellesenne/ac064bf185dfb9ffe2627f3aeaf45e39 to your computer and use it in GitHub Desktop.
SASS Mixins for CSS @Keyframes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SASS Mixins for CSS @keyframes <https://joshbroton.com/quick-fix-sass-mixins-for-css-keyframe-animations/> | |
@mixin keyframes($animationName) { | |
@-webkit-keyframes #{$animationName} { | |
@content; | |
} | |
@-moz-keyframes #{$animationName} { | |
@content; | |
} | |
@-o-keyframes #{$animationName} { | |
@content; | |
} | |
@keyframes #{$animationName} { | |
@content; | |
} | |
} | |
/* How to use | |
@include keyframes(move-the-object) { | |
0% { left: 100px; } | |
100% { left: 200px; } | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment