forked from jlong/css-spinners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhirly.scss
44 lines (34 loc) · 1.13 KB
/
whirly.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@import "compass/css3";
$whirly-loader-size: 64px !default;
$whirly-loader-color: #e66 !default;
$whirly-loader-speed: 1.25s !default;
$whirly-loader-radius: $whirly-loader-size / 2 !default;
$whirly-loader-dot-size: $whirly-loader-size / 8 !default;
@include keyframes(whirly-loader) {
0% { @include rotateZ(0deg); }
100% { @include rotateZ(360deg); }
}
/* :not(:required) hides this rule from IE9 and below */
.whirly-loader:not(:required) {
overflow: hidden;
position: relative;
text-indent: -9999px;
display: inline-block;
width: $whirly-loader-dot-size;
height: $whirly-loader-dot-size;
background: transparent;
@include border-radius(100%);
$shadows: comma-list();
$angle: 0deg;
@while $angle < 360deg {
$size: (18px - ($angle / 10deg * 1px)) / 3;
$radius: $whirly-loader-radius - $size;
$x: $radius * sin($angle);
$y: $radius * cos($angle);
$shadows: append($shadows, $whirly-loader-color $x $y 0 $size);
$angle: $angle + 2deg;
}
@include box-shadow($shadows);
@include animation(whirly-loader $whirly-loader-speed infinite linear);
@include transform-origin(50%, 50%);
}