Delay skeleton loading to prevent flickering

This commit is contained in:
Wendelin 2025-02-18 15:18:53 +01:00
parent 18b2360e46
commit 25a14c87a5
No known key found for this signature in database

View File

@ -1211,7 +1211,35 @@ class HaSidebar extends SubscribeMixin(LitElement) {
transform: scaleX(var(--scale-direction));
}
@keyframes skeletonAnimate {
0% {
opacity: 0;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes contentAnimate {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.loading {
opacity: 0;
animation-name: skeletonAnimate;
animation-duration: 2000ms;
animation-delay: 0;
animation-iteration-count: 1;
animation-fill-mode: forwards;
animation-timing-function: ease-out;
padding: 16px;
display: flex;
flex-direction: column;