| 1 |
// Variables --------------------------------------------------- |
| 2 |
$size: 12px; |
| 3 |
$gap: 9px; |
| 4 |
$radius: 50%; |
| 5 |
$duration: 1500ms; |
| 6 |
$timing: cubic-bezier(0.5, 0, 0.75, 0); |
| 7 |
$darkBackground: #050a0e; |
| 8 |
$lightBackground: #fff; |
| 9 |
|
| 10 |
// ------------------------------------------------------------- |
| 11 |
|
| 12 |
.depicter-dot-flashing { |
| 13 |
display: inline-flex; |
| 14 |
align-items: center; |
| 15 |
justify-content: center; |
| 16 |
gap: $gap; |
| 17 |
|
| 18 |
span { |
| 19 |
display: inline-block; |
| 20 |
width: $size; |
| 21 |
height: $size; |
| 22 |
border-radius: $radius; |
| 23 |
} |
| 24 |
|
| 25 |
&.depicter-loading-dark { |
| 26 |
span { |
| 27 |
background-color: $darkBackground; |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
&.depicter-loading-light { |
| 32 |
span { |
| 33 |
background-color: $lightBackground; |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
span { |
| 38 |
will-change: opacity; |
| 39 |
animation: middleDotFlashing $duration infinite $timing; |
| 40 |
|
| 41 |
&:first-of-type { |
| 42 |
animation: firstDotFlashing $duration infinite $timing; |
| 43 |
} |
| 44 |
|
| 45 |
&:last-of-type { |
| 46 |
animation: lastDotFlashing $duration infinite $timing; |
| 47 |
} |
| 48 |
} |
| 49 |
|
| 50 |
@keyframes firstDotFlashing { |
| 51 |
0% { |
| 52 |
opacity: 1; |
| 53 |
} |
| 54 |
33.3% { |
| 55 |
opacity: 0.2; |
| 56 |
} |
| 57 |
66.6%, |
| 58 |
100% { |
| 59 |
opacity: 1; |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
@keyframes middleDotFlashing { |
| 64 |
0%, |
| 65 |
5% { |
| 66 |
opacity: 1; |
| 67 |
} |
| 68 |
38.8% { |
| 69 |
opacity: 0.2; |
| 70 |
} |
| 71 |
72.2%, |
| 72 |
100% { |
| 73 |
opacity: 1; |
| 74 |
} |
| 75 |
} |
| 76 |
|
| 77 |
@keyframes lastDotFlashing { |
| 78 |
0%, |
| 79 |
23.3% { |
| 80 |
opacity: 1; |
| 81 |
} |
| 82 |
56.6% { |
| 83 |
opacity: 0.2; |
| 84 |
} |
| 85 |
90%, |
| 86 |
100% { |
| 87 |
opacity: 1; |
| 88 |
} |
| 89 |
} |
| 90 |
} |
| 91 |
|