Created
June 1, 2015 20:47
-
-
Save Jhony0311/ac5eb0f35515d13da0de to your computer and use it in GitHub Desktop.
SASS Animations Mixin Sure crossplatform
This file contains hidden or 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
@include keyframes(bounce-around) { | |
0% { | |
transform: rotateZ(0deg) translate3d(0,10%,0) rotateZ(0deg); | |
} | |
100% { | |
transform: rotateZ(360deg) translate3d(0,10%,0) rotateZ(-360deg); | |
} | |
} |
This file contains hidden or 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
// 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