netlify-cms-react-starter/src/components/Spinner.css
2018-02-16 10:51:43 +10:00

84 lines
2.1 KiB
CSS

.Spinner {
position: fixed;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.7);
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
}
.semipolar-spinner,
.semipolar-spinner * {
box-sizing: border-box;
}
.semipolar-spinner {
--size: 150px;
--duration: 750ms;
--color: var(--primary);
height: var(--size);
width: var(--size);
position: relative;
}
.semipolar-spinner .ring {
border-radius: 50%;
position: absolute;
border: calc(var(--size) * 0.05) solid transparent;
border-top-color: var(--color);
border-left-color: var(--color);
animation: semipolar-spinner-animation 2s infinite;
}
.semipolar-spinner .ring:nth-child(1) {
height: calc(var(--size) - var(--size) * 0.2 * 0);
width: calc(var(--size) - var(--size) * 0.2 * 0);
top: calc(var(--size) * 0.1 * 0);
left: calc(var(--size) * 0.1 * 0);
animation-delay: calc(var(--duration) * 0.1 * 4);
z-index: 5;
}
.semipolar-spinner .ring:nth-child(2) {
height: calc(var(--size) - var(--size) * 0.2 * 1);
width: calc(var(--size) - var(--size) * 0.2 * 1);
top: calc(var(--size) * 0.1 * 1);
left: calc(var(--size) * 0.1 * 1);
animation-delay: calc(var(--duration) * 0.1 * 3);
z-index: 4;
}
.semipolar-spinner .ring:nth-child(3) {
height: calc(var(--size) - var(--size) * 0.2 * 2);
width: calc(var(--size) - var(--size) * 0.2 * 2);
top: calc(var(--size) * 0.1 * 2);
left: calc(var(--size) * 0.1 * 2);
animation-delay: calc(var(--duration) * 0.1 * 2);
z-index: 3;
}
.semipolar-spinner .ring:nth-child(4) {
height: calc(var(--size) - var(--size) * 0.2 * 3);
width: calc(var(--size) - var(--size) * 0.2 * 3);
top: calc(var(--size) * 0.1 * 3);
left: calc(var(--size) * 0.1 * 3);
animation-delay: calc(var(--duration) * 0.1 * 1);
z-index: 2;
}
.semipolar-spinner .ring:nth-child(5) {
height: calc(var(--size) - var(--size) * 0.2 * 4);
width: calc(var(--size) - var(--size) * 0.2 * 4);
top: calc(var(--size) * 0.1 * 4);
left: calc(var(--size) * 0.1 * 4);
animation-delay: calc(var(--duration) * 0.1 * 0);
z-index: 1;
}
@keyframes semipolar-spinner-animation {
50% {
transform: rotate(360deg) scale(0.7);
}
}