Skip to content

Instantly share code, notes, and snippets.

@metaskills
Created February 28, 2012 14:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save metaskills/1932882 to your computer and use it in GitHub Desktop.
Save metaskills/1932882 to your computer and use it in GitHub Desktop.
Custom Sass Mixin To Supplement Compass' Transition Tools
@mixin animation (
$name: false,
$duration: false,
$timing_function: false,
$delay: false,
$iteration_count: false,
$direction: false
) {
@if $name { -webkit-animation-name: $name; -moz-animation-name: $name; -ms-animation-name: $name; }
@if $duration { -webkit-animation-duration: $duration; -moz-animation-duration: $duration; -ms-animation-duration: $duration; }
@if $timing_function { -webkit-animation-timing-function: $timing_function; -moz-animation-timing-function: $timing_function; -ms-animation-timing-function: $timing_function; }
@if $delay { -webkit-animation-delay: $delay; -moz-animation-delay: $delay; -ms-animation-delay: $delay; }
@if $iteration_count { -webkit-animation-iteration-count: $iteration_count; -moz-animation-iteration-count: $iteration_count; -ms-animation-iteration-count: $iteration_count; }
@if $direction { -webkit-animation-direction: $direction; -moz-animation-direction: $direction; -ms-animation-direction: $direction; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment