Created
November 20, 2014 08:57
-
-
Save javierarques/e2fa4bc3eec8904c4757 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
@import "compass"; | |
@mixin animation-loading-two-colors ( $color-a, $color-b, $number-of-items: 5) { | |
$delay: 100ms; | |
$max-items: $number-of-items - 1; | |
$step-progress: 100 / $number-of-items; | |
%animation-loading-basic { | |
display: inline-block; | |
vertical-align: middle; | |
width: 1em; | |
height: 1em; | |
margin: .2em; | |
@include border-radius(100%); | |
} | |
span { | |
@extend %animation-loading-basic; | |
-webkit-animation:loading $number-of-items*$delay infinite alternate; | |
animation: loading $number-of-items*$delay infinite alternate; | |
@for $i from 1 through ($number-of-items){ | |
&:nth-of-type(#{$i}) { | |
@include animation-delay($delay*($i - 1)); | |
background: mix( $color-a, $color-b, 100-$step-progress*($i - 1)); | |
} | |
} | |
} | |
} | |
@include keyframes (loading) { | |
0% { | |
@include transform( scale(1.3) ); | |
opacity: 1; | |
} | |
100% { | |
@include transform( scale(1) ); | |
opacity: 0.5; | |
} | |
} |
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
@-moz-keyframes loading { | |
0% { | |
-moz-transform: scale(1.3); | |
transform: scale(1.3); | |
opacity: 1; | |
} | |
100% { | |
-moz-transform: scale(1); | |
transform: scale(1); | |
opacity: 0.5; | |
} | |
} | |
@-webkit-keyframes loading { | |
0% { | |
-webkit-transform: scale(1.3); | |
transform: scale(1.3); | |
opacity: 1; | |
} | |
100% { | |
-webkit-transform: scale(1); | |
transform: scale(1); | |
opacity: 0.5; | |
} | |
} | |
@keyframes loading { | |
0% { | |
-moz-transform: scale(1.3); | |
-ms-transform: scale(1.3); | |
-webkit-transform: scale(1.3); | |
transform: scale(1.3); | |
opacity: 1; | |
} | |
100% { | |
-moz-transform: scale(1); | |
-ms-transform: scale(1); | |
-webkit-transform: scale(1); | |
transform: scale(1); | |
opacity: 0.5; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment