feat(console-web): add swinging iframe load progress
- place an indeterminate progress track below the loading label - animate the indicator between both ends of the track - expose an accessible progressbar label for the active view - honor reduced-motion preferences with a static indicator
This commit is contained in:
@@ -317,13 +317,39 @@
|
||||
@apply h-3 animate-pulse rounded-sm bg-[#dfe6e4];
|
||||
}
|
||||
|
||||
.loading-progress-track {
|
||||
@apply h-1 w-40 overflow-hidden rounded-sm bg-line;
|
||||
}
|
||||
|
||||
.loading-progress-indicator {
|
||||
@apply block h-full w-[36%] rounded-sm bg-brand;
|
||||
animation: loading-progress-swing 1s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
.spin {
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loading-progress-swing {
|
||||
from {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(178%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.loading-progress-indicator {
|
||||
animation: none;
|
||||
transform: translateX(89%);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user