Skip to content

Instantly share code, notes, and snippets.

@Tenderfeel
Created August 31, 2012 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tenderfeel/3554738 to your computer and use it in GitHub Desktop.
Save Tenderfeel/3554738 to your computer and use it in GitHub Desktop.
CSS3 Animations mixin
//need gist: 3554697
//再生時間
$default-animation-duration : 0.5s !default;
//実行までの待ち時間
$default-animation-delay : 0 !default;
//実行回数(number | infinite)
$default-animation-iteration-count: 1 !default;
//タイミング(ease | liner | ease-in | ease-out | ease-in-out | cubic-bezier)
$default-animation-timing-function: ease !default;
//反復の有無(normal | alternate)
$default-animation-direction: normal !default;
//実行前や実行後のスタイル指定(none | forwards | backwards | both)
$default-animation-fill-mode: both !default;
@mixin animation (
$name :none,
$duration :$default-animation-duration,
$function :$default-animation-timing-function,
$delay :$default-animation-delay,
$count :$default-animation-iteration-count,
$direction:$default-animation-direction,
$fillMode :$default-animation-fill-mode
){
@include prefix(animation, $name $duration $function $delay $count $direction);
@if $fillMode {
@include prefix(animation-fill-mode, $fillMode);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment