Loader and animation

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-01-11 14:12:39 +01:00
parent c4e51fd055
commit 27a1dadea4
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
1 changed files with 33 additions and 53 deletions

View File

@ -13,9 +13,7 @@
.loading, .loading-small, .icon-loading, .icon-loading-dark, .icon-loading-small, .icon-loading-small-dark {
position: relative;
}
.loading:after, .loading-small:after, .icon-loading:after, .icon-loading-dark:after, .icon-loading-small:after, .icon-loading-small-dark:after {
&:after {
z-index: 2;
content: '';
height: 30px;
@ -30,63 +28,45 @@
-webkit-transform-origin: center;
-ms-transform-origin: center;
transform-origin: center;
}
.loading:after, .loading-small:after, .icon-loading:after, .icon-loading-dark:after, .icon-loading-small:after, .icon-loading-small-dark:after {
border: 2px solid rgba(150, 150, 150, 0.5);
border-top-color: rgb(100, 100, 100);
}
}
.icon-loading-dark:after, .icon-loading-small-dark:after {
.icon-loading-dark:after,
.icon-loading-small-dark:after {
border: 2px solid rgba(187, 187, 187, 0.5);
border-top-color: #bbb;
}
.icon-loading-small:after, .icon-loading-small-dark:after {
.icon-loading-small:after,
.icon-loading-small-dark:after {
height: 14px;
width: 14px;
margin: -8px 0 0 -8px;
}
/* Css replaced elements don't have ::after nor ::before */
img.icon-loading, object.icon-loading, video.icon-loading, button.icon-loading, textarea.icon-loading, input.icon-loading, select.icon-loading {
img, object, video, button, textarea, input, select {
.icon-loading {
background-image: url('../img/loading.gif');
}
img.icon-loading-dark, object.icon-loading-dark, video.icon-loading-dark, button.icon-loading-dark, textarea.icon-loading-dark, input.icon-loading-dark, select.icon-loading-dark {
.icon-loading-dark {
background-image: url('../img/loading-dark.gif');
}
img.icon-loading-small, object.icon-loading-small, video.icon-loading-small, button.icon-loading-small, textarea.icon-loading-small, input.icon-loading-small, select.icon-loading-small {
.icon-loading-small {
background-image: url('../img/loading-small.gif');
}
img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading-small-dark, button.icon-loading-small-dark, textarea.icon-loading-small-dark, input.icon-loading-small-dark, select.icon-loading-small-dark {
.icon-loading-small-dark {
background-image: url('../img/loading-small-dark.gif');
}
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes rotate {
from {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}