forked from jlong/css-spinners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircles.scss
57 lines (46 loc) · 1.69 KB
/
circles.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
45
46
47
48
49
50
51
52
53
54
55
56
57
@import "compass/css3";
$circles-loader-size: 50px !default;
$circles-loader-speed: 3s !default;
$circles-loader-colors: rgba(#fc3, 0.9) rgba(#f60, 0.6) rgba(#f30, 0.4) !default;
$circles-loader-radius: $circles-loader-size / 4 !default;
$circles-loader-diameter: $circles-loader-size / 2 !default;
$circles-loader-1: nth($circles-loader-colors, 1) !default;
$circles-loader-2: nth($circles-loader-colors, 2) !default;
$circles-loader-3: nth($circles-loader-colors, 3) !default;
@include keyframes(circles-loader) {
0% { @include rotateZ(-2*360deg); }
50% { @include rotateZ(2*360deg); }
}
/* :not(:required) hides this rule from IE9 and below */
.circles-loader:not(:required) {
position: relative;
text-indent: -9999px;
display: inline-block;
width: $circles-loader-diameter;
height: $circles-loader-diameter;
background: $circles-loader-1;
border-radius: 100%;
//@include box-shadow(white 0 -($circles-loader-segment/2) 0 0 inset);
&::before {
background: $circles-loader-2;
border-radius: 100%;
content: '';
position: absolute;
width: $circles-loader-diameter;
height: $circles-loader-diameter;
top: $circles-loader-radius + ($circles-loader-radius * sin(30deg));
left: -$circles-loader-radius * cos(30deg);
}
&::after {
background: $circles-loader-3;
border-radius: 100%;
content: '';
position: absolute;
width: $circles-loader-diameter;
height: $circles-loader-diameter;
top: $circles-loader-radius + ($circles-loader-radius * sin(30deg));
left: $circles-loader-radius * cos(30deg);
}
@include animation(circles-loader $circles-loader-speed infinite ease-in-out);
@include transform-origin(50%, 100%);
}