scratch-www/src/components/spinner/spinner.scss

59 lines
1 KiB
SCSS
Raw Normal View History

2015-11-03 19:02:28 -05:00
@import "../../colors";
.spinner {
2015-11-03 19:02:28 -05:00
position: relative;
2016-06-06 10:10:27 -04:00
margin: 0 auto;
width: 20px;
height: 20px;
.circle {
position: absolute;
top: 0;
2015-11-03 19:02:28 -05:00
left: 0;
width: 100%;
height: 100%;
&:before {
display: block;
2015-11-03 19:02:28 -05:00
animation: circleFadeDelay 1.2s infinite ease-in-out both;
margin: 0 auto;
2015-11-03 19:02:28 -05:00
border-radius: 100%;
2016-06-06 10:10:27 -04:00
background-color: darken($ui-white, 8%);
width: 15%;
height: 15%;
2015-11-03 19:02:28 -05:00
content: "";
2016-06-06 10:10:27 -04:00
.white & {
background-color: darken($ui-blue, 8%);
2016-06-06 10:10:27 -04:00
}
}
}
@for $i from 1 through 12 {
$rotation: 30deg * ($i - 1);
$delay: -1.3s + $i * .1;
.circle#{$i} {
transform: rotate($rotation);
&:before {
animation-delay: $delay;
}
}
}
}
@keyframes circleFadeDelay {
0%,
39%,
100% {
opacity: 0;
}
40% {
opacity: 1;
}
2015-11-03 19:02:28 -05:00
}