Skip to content

Instantly share code, notes, and snippets.

@marciobarrios
Forked from Integralist/1. Example.scss
Created October 23, 2012 02:09
Show Gist options
  • Save marciobarrios/3936265 to your computer and use it in GitHub Desktop.
Save marciobarrios/3936265 to your computer and use it in GitHub Desktop.
Sass Mixin for CSS3 Animations
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@include keyframe(changecolour) {
0% {
color: #000;
}
100% {
color: #FFF;
}
}
@mixin keyframe ($animation_name) {
@-webkit-keyframes $animation_name {
@content;
}
@-moz-keyframes $animation_name {
@content;
}
@-o-keyframes $animation_name {
@content;
}
@keyframes $animation_name {
@content;
}
}
@Integralist
Copy link

Added an extra mixin in case you're interested... https://gist.github.com/3931680#file_3.%20animation.scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment