debian-mirror-gitlab/app/assets/stylesheets/framework/spinner.scss

67 lines
1.2 KiB
SCSS
Raw Normal View History

2019-07-07 11:18:12 +05:30
@mixin spinner-color($color) {
border-color: rgba($color, 0.25);
border-top-color: $color;
}
@mixin spinner-size($size, $border-width) {
width: $size;
height: $size;
border-width: $border-width;
@include webkit-prefix(transform-origin, 50% 50% calc((#{$size} / 2) + #{$border-width}));
}
@keyframes spinner-rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
2021-01-29 00:20:46 +05:30
@mixin spinner($size: 16px, $border-width: 2px, $color: $orange-400) {
2019-07-07 11:18:12 +05:30
border-radius: 50%;
position: relative;
margin: 0 auto;
animation-name: spinner-rotate;
animation-duration: 0.6s;
animation-timing-function: linear;
animation-iteration-count: infinite;
border-style: solid;
display: inline-flex;
2021-01-29 00:20:46 +05:30
@include spinner-size($size, $border-width);
@include spinner-color($color);
}
.spinner {
@include spinner;
2019-07-07 11:18:12 +05:30
&.spinner-md {
@include spinner-size(32px, 3px);
}
&.spinner-lg {
@include spinner-size(64px, 4px);
}
&.spinner-dark {
2020-10-24 23:57:45 +05:30
@include spinner-color($gray-500);
2019-07-07 11:18:12 +05:30
}
&.spinner-light {
@include spinner-color($white);
}
}
2020-03-13 15:44:24 +05:30
.btn {
2020-04-08 14:13:33 +05:30
.spinner,
.gl-spinner {
2020-03-13 15:44:24 +05:30
vertical-align: text-bottom;
}
}
2021-01-29 00:20:46 +05:30
.spin {
animation: spinner-rotate 2s infinite linear;
}