mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 05:13:37 +08:00
33bd99d376
* Update Loading Indicator - Fix mistake in LoadingIndicator Less - Middle align the loading indicator when inline - Fix Loading Indicator not correctly accepting container class names - Add inline and block attributes * Fix loading indicator in composer * Fix loading indicator on notification list * Fix loading indicator on discussion page * Fix loading indicator on button * Update more uses of loading indicator * Fix loading indicator in Search box * Fix AvatarEditor loading spinner * Set default spinner props * Replace "tiny" with "small" in Less * Improve spinner vertical centring in buttons * Reduce size specificity * Use single attribute for block/inline * Use new display attribute * Use classes for different sizes * Use `display=block` by default
66 lines
1.1 KiB
Plaintext
66 lines
1.1 KiB
Plaintext
// ------------------------------------
|
|
// Loading Indicators
|
|
|
|
.LoadingIndicator {
|
|
@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 {
|
|
--size: 24px;
|
|
--thickness: 2px;
|
|
|
|
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;
|
|
|
|
// Size
|
|
|
|
&--large {
|
|
--size: 32px;
|
|
--thickness: 3px;
|
|
}
|
|
|
|
&--small {
|
|
--size: 18px;
|
|
}
|
|
|
|
// Display types
|
|
|
|
&--block {
|
|
height: 100px;
|
|
}
|
|
|
|
&--inline {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes spin {
|
|
from {
|
|
transform: rotate(0);
|
|
}
|
|
|
|
to {
|
|
transform: rotate(1turn);
|
|
}
|
|
}
|