-
-
Save chasewoodford/2939636 to your computer and use it in GitHub Desktop.
sass:mixin fadeIn
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
$prefix:'-moz-', '-webkit-', '-o-', '-ms-', ''; | |
// ******************** | |
// fadeIn | |
// ******************** | |
@mixin keyframe-fadeIn { | |
0% { opacity:0; } | |
100% { opacity:1; } | |
} | |
@-moz-keyframes fadeIn { | |
@include keyframe-fadeIn; | |
} | |
@-webkit-keyframes fadeIn { | |
@include keyframe-fadeIn; | |
} | |
@-o-keyframes fadeIn { | |
@include keyframe-fadeIn; | |
} | |
@-ms-keyframes fadeIn { | |
@include keyframe-fadeIn; | |
} | |
@keyframes fadeIn { | |
@include keyframe-fadeIn; | |
} | |
@mixin fadeIn( $arg ) { | |
$keyframe-name:fadeIn; | |
$duration:$arg; | |
@each $p in $prefix { | |
#{$p}animation:$keyframe-name $duration; | |
} | |
} | |
// e.g. @include fadeIn( 2s ); |
Nice
Thanks! Still useful as ever!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great mixin :) thanks!