Skip to content

Instantly share code, notes, and snippets.

@joellesenne
Created September 4, 2020 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joellesenne/ac064bf185dfb9ffe2627f3aeaf45e39 to your computer and use it in GitHub Desktop.
Save joellesenne/ac064bf185dfb9ffe2627f3aeaf45e39 to your computer and use it in GitHub Desktop.
SASS Mixins for CSS @Keyframes
// 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