Skip to content

Instantly share code, notes, and snippets.

@ritcheyer
Forked from Integralist/1. Example.scss
Created October 22, 2012 21:37
Show Gist options
  • Save ritcheyer/3934595 to your computer and use it in GitHub Desktop.
Save ritcheyer/3934595 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