style: improve feel of spinner removal
This commit is contained in:
parent
ca31a63bb7
commit
bea35a2015
@ -214,25 +214,23 @@ div.alert *:last-child {
|
|||||||
|
|
||||||
#blog-loading-spinner {
|
#blog-loading-spinner {
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
|
height: auto;
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
&.removed {
|
&.removed {
|
||||||
animation: spinner-removed 2s ease-in-out;
|
margin: 0;
|
||||||
|
height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spinner-removed {
|
a.bmc-btn {
|
||||||
0% {
|
&:link, &:visited, &:active {
|
||||||
transform: scaleY(1);
|
color: #000;
|
||||||
opacity: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
&:hover {
|
||||||
transform: scaleY(1);
|
color: #fff;
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
transform: scaleY(0);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -54,7 +54,7 @@ declare const Prism: any;
|
|||||||
const spinner = document.querySelector("#blog-loading-spinner");
|
const spinner = document.querySelector("#blog-loading-spinner");
|
||||||
if (spinner) {
|
if (spinner) {
|
||||||
spinner.classList.add("removed");
|
spinner.classList.add("removed");
|
||||||
setTimeout(() => spinner.remove(), 1100);
|
setTimeout(() => spinner.remove(), 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user