forked from jlong/css-spinners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimer.scss
52 lines (47 loc) · 1.59 KB
/
timer.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
@import "compass/css3";
$timer-size: 48px !default;
$timer-speed: 1250ms !default;
$timer-color: #c8d !default;
$timer-border-width: $timer-size / 8 !default;
@include keyframes(timer-loader) {
0% { @include rotateZ(0deg); }
100% { @include rotateZ(360deg); }
}
/* :not(:required) hides this rule from IE9 and below */
.timer-loader:not(:required) {
border: $timer-border-width solid $timer-color;
@include border-radius($timer-size / 2);
@include box-sizing(border-box);
display: inline-block;
overflow: hidden;
position: relative;
text-indent: -9999px;
width: $timer-size;
height: $timer-size;
&::before {
@include animation(timer-loader $timer-speed infinite linear);
@include transform-origin($timer-size / 16, $timer-size / 16);
background: $timer-color;
@include border-radius($timer-size / 16);
content: '';
display: block;
position: absolute;
width: ($timer-size / 8);
height: (2 * $timer-size / 5);
left: ($timer-size / 2) - ($timer-size / 16) - $timer-border-width;
top: ($timer-size / 2) - ($timer-size / 16) - $timer-border-width;
}
&::after {
@include animation(timer-loader (12 * $timer-speed) infinite linear);
@include transform-origin($timer-size / 16, $timer-size / 16);
background: $timer-color;
@include border-radius($timer-size / 16);
content: '';
display: block;
position: absolute;
width: ($timer-size / 8);
height: ($timer-size / 3);
left: ($timer-size / 2) - ($timer-size / 16) - $timer-border-width;
top: ($timer-size / 2) - ($timer-size / 16) - $timer-border-width;
}
}