2015-07-17 13:17:49 +08:00
|
|
|
// ------------------------------------
|
|
|
|
// Loading Indicators
|
|
|
|
|
|
|
|
.LoadingIndicator {
|
2021-04-09 07:42:32 +08:00
|
|
|
@spin-time: 750ms;
|
|
|
|
|
|
|
|
// Use the value of `color` to maintain backwards compatibility
|
|
|
|
border-color: currentColor;
|
|
|
|
border-width: var(--thickness);
|
|
|
|
border-style: solid;
|
|
|
|
border-top-color: transparent;
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
width: var(--size);
|
|
|
|
height: var(--size);
|
|
|
|
|
|
|
|
animation: spin @spin-time linear infinite;
|
|
|
|
|
|
|
|
// <div> container around the spinner
|
|
|
|
// Used for positioning
|
|
|
|
&-container {
|
2021-04-21 19:26:09 +08:00
|
|
|
--size: 24px;
|
|
|
|
--thickness: 2px;
|
|
|
|
|
2021-04-09 07:42:32 +08:00
|
|
|
color: @muted-color;
|
|
|
|
|
|
|
|
// Center vertically and horizontally
|
|
|
|
// Allows people to set `height` and it'll stay centered within the new height
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
2021-04-21 19:26:09 +08:00
|
|
|
// Size
|
|
|
|
|
|
|
|
&--large {
|
|
|
|
--size: 32px;
|
|
|
|
--thickness: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--small {
|
|
|
|
--size: 18px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Display types
|
|
|
|
|
2021-04-09 07:42:32 +08:00
|
|
|
&--block {
|
|
|
|
height: 100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--inline {
|
|
|
|
display: inline-block;
|
2021-04-21 19:26:09 +08:00
|
|
|
vertical-align: middle;
|
2021-04-09 07:42:32 +08:00
|
|
|
}
|
|
|
|
}
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
2021-04-09 07:42:32 +08:00
|
|
|
|
|
|
|
@keyframes spin {
|
|
|
|
from {
|
|
|
|
transform: rotate(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
to {
|
|
|
|
transform: rotate(1turn);
|
|
|
|
}
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|