forked from jlong/css-spinners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhexdots.scss
194 lines (186 loc) · 9.49 KB
/
hexdots.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
@import "compass/css3";
$hexdots-loader-size: 49px !default;
$hexdots-loader-color: #999 !default;
$hexdots-loader-colors: darken($hexdots-loader-color, 20%) $hexdots-loader-color $hexdots-loader-color $hexdots-loader-color $hexdots-loader-color $hexdots-loader-color $hexdots-loader-color !default;
$hexdots-loader-speed: 5s !default;
$hexdots-loader-1: nth($hexdots-loader-colors, 1);
$hexdots-loader-2: nth($hexdots-loader-colors, 2);
$hexdots-loader-3: nth($hexdots-loader-colors, 3);
$hexdots-loader-4: nth($hexdots-loader-colors, 4);
$hexdots-loader-5: nth($hexdots-loader-colors, 5);
$hexdots-loader-6: nth($hexdots-loader-colors, 6);
$hexdots-loader-7: nth($hexdots-loader-colors, 7);
$hexdots-loader-segment: $hexdots-loader-size / 7 !default;
$hexdots-loader-dot-size: $hexdots-loader-segment * 3 !default;
$hexdots-loader-position-1: 0 -30px;
$hexdots-loader-position-2: 26px -15px;
$hexdots-loader-position-3: 26px 15px;
$hexdots-loader-position-4: 0 30px;
$hexdots-loader-position-5: -26px 15px;
$hexdots-loader-position-6: -26px -15px;
@include keyframes(hexdots-loader) {
0% {
@include box-shadow(
$hexdots-loader-1 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
8.33% {
@include box-shadow(
$hexdots-loader-1 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
16.67% {
@include box-shadow(
$hexdots-loader-1 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
25% {
@include box-shadow (
$hexdots-loader-1 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
33.33% {
@include box-shadow(
$hexdots-loader-1 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
41.67% {
@include box-shadow(
$hexdots-loader-1 $hexdots-loader-position-6 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-6 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-6 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-6 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-6 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-6 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
50% {
@include box-shadow(
$hexdots-loader-1 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-1 0 $hexdots-loader-segment
);
}
58.33% {
@include box-shadow (
$hexdots-loader-1 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-2 0 $hexdots-loader-segment
);
}
66.67% {
@include box-shadow (
$hexdots-loader-1 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-3 0 $hexdots-loader-segment
);
}
75% {
@include box-shadow (
$hexdots-loader-1 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-4 0 $hexdots-loader-segment
);
}
83.33% {
@include box-shadow (
$hexdots-loader-1 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-5 0 $hexdots-loader-segment
);
}
91.67% {
@include box-shadow (
$hexdots-loader-1 $hexdots-loader-position-6 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
100% {
@include box-shadow (
$hexdots-loader-1 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-5 0 $hexdots-loader-segment,
$hexdots-loader-7 $hexdots-loader-position-6 0 $hexdots-loader-segment
);
}
}
/* :not(:required) hides this rule from IE9 and below */
.hexdots-loader:not(:required) {
overflow: hidden;
position: relative;
text-indent: -9999px;
display: inline-block;
width: $hexdots-loader-segment;
height: $hexdots-loader-segment;
background: transparent;
border-radius: 100%;
@include box-shadow(
$hexdots-loader-1 $hexdots-loader-position-1 0 $hexdots-loader-segment,
$hexdots-loader-2 $hexdots-loader-position-2 0 $hexdots-loader-segment,
$hexdots-loader-3 $hexdots-loader-position-3 0 $hexdots-loader-segment,
$hexdots-loader-4 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-5 $hexdots-loader-position-4 0 $hexdots-loader-segment,
$hexdots-loader-6 $hexdots-loader-position-4 0 $hexdots-loader-segment
);
@include animation(hexdots-loader $hexdots-loader-speed infinite ease-in-out);
@include transform-origin(50%, 50%);
}