Skip to content

Instantly share code, notes, and snippets.

@Jhony0311
Created June 1, 2015 20:47
Show Gist options
  • Save Jhony0311/ac5eb0f35515d13da0de to your computer and use it in GitHub Desktop.
Save Jhony0311/ac5eb0f35515d13da0de to your computer and use it in GitHub Desktop.
SASS Animations Mixin Sure crossplatform
@include keyframes(bounce-around) {
0% {
transform: rotateZ(0deg) translate3d(0,10%,0) rotateZ(0deg);
}
100% {
transform: rotateZ(360deg) translate3d(0,10%,0) rotateZ(-360deg);
}
}
// Animation Mixins
@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;
}
}
@mixin animation($str) {
-webkit-animation: #{$str};
-moz-animation: #{$str};
-ms-animation: #{$str};
-o-animation: #{$str};
animation: #{$str};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment