Welcome to mirror list, hosted at ThFree Co, Russian Federation.

spinner.scss « framework « stylesheets « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2aa0ab6c1eba48b7d1dc0a92986ef2b1ff56daec (plain)
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
@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);
  }
}

@mixin spinner($size: 16px, $border-width: 2px, $color: $orange-400) {
  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;
  @include spinner-size($size, $border-width);
  @include spinner-color($color);
}

.spinner {
  @include spinner;

  &.spinner-md {
    @include spinner-size(32px, 3px);
  }

  &.spinner-lg {
    @include spinner-size(64px, 4px);
  }

  &.spinner-dark {
    @include spinner-color($gray-500);
  }

  &.spinner-light {
    @include spinner-color($white);
  }
}

.btn {
  .spinner,
  .gl-spinner {
    vertical-align: text-bottom;
  }
}

.spin {
  animation: spinner-rotate 2s infinite linear;
}