-
-
Save marciobarrios/3936265 to your computer and use it in GitHub Desktop.
Sass Mixin for CSS3 Animations
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
@include keyframe(fadeout) { | |
0% { | |
opacity: 1; | |
} | |
100% { | |
opacity: 0; | |
} | |
} | |
@include keyframe(changecolour) { | |
0% { | |
color: #000; | |
} | |
100% { | |
color: #FFF; | |
} | |
} |
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
@mixin keyframe ($animation_name) { | |
@-webkit-keyframes $animation_name { | |
@content; | |
} | |
@-moz-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
Added an extra mixin in case you're interested... https://gist.github.com/3931680#file_3.%20animation.scss