Created
August 31, 2012 15:36
-
-
Save Tenderfeel/3554738 to your computer and use it in GitHub Desktop.
CSS3 Animations mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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