Skip to content

Instantly share code, notes, and snippets.

@imlinus
Last active December 29, 2015 13:19
Show Gist options
  • Select an option

  • Save imlinus/7676884 to your computer and use it in GitHub Desktop.

Select an option

Save imlinus/7676884 to your computer and use it in GitHub Desktop.
animate/keyframes/transition helper mixins
// Mixin for keyframes
// basic usage:
// @include keyframes(name) {
// 0% { background: yellow; }
// 100% { background: blue; }
// }
@mixin keyframes($name) {
@-webkit-keyframes $name { @content; }
@-moz-keyframes $name { @content; }
@keyframes $name { @content; }
}
// Mixin for calling an animation
// basic usage:
// @include animation(animation .5s ease-in-out);
@mixin animation($animation...) {
@include prefix(animation, $animation...);
}
// Mixin for calling an transition
// basic usage:
// @include transition(all .25s ease-in-out);
@mixin transition($transition...) {
@include prefix(transition, $transition...);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment