Skip to content

Instantly share code, notes, and snippets.

@magician11
Created May 16, 2015 20:33
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 magician11/135d4f2cfffea828c828 to your computer and use it in GitHub Desktop.
Save magician11/135d4f2cfffea828c828 to your computer and use it in GitHub Desktop.
Keyframes for all vendor prefixes using SCSS
/* Usage
@include keyframes(my-transition) {
from {opacity: 0;}
to {opacity: 1;}
}
*/
@mixin keyframes($animation-name) {
@-webkit-keyframes #{$animation-name} {
@content;
}
@-moz-keyframes #{$animation-name} {
@content;
}
@-ms-keyframes #{$animation-name} {
@content;
}
@-o-keyframes #{$animation-name} {
@content;
}
@keyframes #{$animation-name} {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment