forked from jlong/css-spinners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flower.scss
58 lines (50 loc) · 2.4 KB
/
flower.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
58
@import "compass/css3";
$flower-loader-size: 40px !default;
$flower-loader-colors: #fd8 #e96 !default;
$flower-loader-speed: 5s !default;
$flower-loader-petal: nth($flower-loader-colors, 1) !default;
$flower-loader-center: nth($flower-loader-colors, 2) !default;
$flower-loader-segment: $flower-loader-size / 10 !default;
$flower-loader-dot-size: $flower-loader-segment * 4 !default;
@include keyframes(flower-loader) {
0% {
@include rotateZ(0deg);
@include box-shadow(
white 0 0 15px 0,
$flower-loader-petal (-3 * $flower-loader-segment) (-3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal ( 3 * $flower-loader-segment) (-3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal ( 3 * $flower-loader-segment) ( 3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal (-3 * $flower-loader-segment) ( 3 * $flower-loader-segment) 0 $flower-loader-segment
);
}
50% {
@include rotateZ(3 * 360deg);
@include box-shadow(
white 0 0 15px 0,
$flower-loader-petal ( 3 * $flower-loader-segment) ( 3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal (-3 * $flower-loader-segment) ( 3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal (-3 * $flower-loader-segment) (-3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal ( 3 * $flower-loader-segment) (-3 * $flower-loader-segment) 0 $flower-loader-segment
);
}
}
/* :not(:required) hides this rule from IE9 and below */
.flower-loader:not(:required) {
overflow: hidden;
position: relative;
text-indent: -9999px;
display: inline-block;
width: $flower-loader-dot-size;
height: $flower-loader-dot-size;
background: $flower-loader-center;
border-radius: 100%;
@include box-shadow(
white 0 0 15px 0,
$flower-loader-petal (-3 * $flower-loader-segment) (-3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal ( 3 * $flower-loader-segment) (-3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal ( 3 * $flower-loader-segment) ( 3 * $flower-loader-segment) 0 $flower-loader-segment,
$flower-loader-petal (-3 * $flower-loader-segment) ( 3 * $flower-loader-segment) 0 $flower-loader-segment
);
@include animation(flower-loader $flower-loader-speed infinite ease-in-out);
@include transform-origin(50%, 50%);
}