1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Replace spin.js with a CSS-only loading spinner (#2764)

* Create CSS only loading indicator

* Core mods to fix Loading Indicator usage

* Remove extra whitespace

* Attrs interface extends ComponentAttrs and is exported

* Add doc block about custom styling
This commit is contained in:
David Wheatley
2021-04-09 00:42:32 +01:00
committed by GitHub
parent c006931798
commit f76524a5de
6 changed files with 140 additions and 60 deletions

View File

@@ -15,13 +15,9 @@
float: left;
margin-left: -65px;
margin-top: -4px;
.LoadingIndicator {
display: inline-block;
margin-left: 20px;
}
}
}
.Checkbox--switch .Checkbox-display {
width: 50px;
height: 28px;
@@ -31,8 +27,28 @@
background: @control-bg;
.transition(background-color 0.2s);
.LoadingIndicator {
--size: 22px !important;
&-container {
height: 22px;
}
}
.on& {
background: #58a400;
.LoadingIndicator-container {
// Show loading indicator over the switch button
justify-content: flex-end;
}
}
.off& {
.LoadingIndicator-container {
// Show loading indicator over the switch button
justify-content: flex-start;
}
}
&:before {