iter: b03 新增 skeleton 骨架屏组件(三形状占位 + 扫光 + reduced-motion 兜底)
This commit is contained in:
@@ -379,6 +379,49 @@
|
||||
background: color-mix(in srgb, var(--ua-color-danger) 12%, transparent);
|
||||
}
|
||||
|
||||
/* —— 骨架屏:占位灰块 + 扫光 —— */
|
||||
.ua-skeleton {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: var(--ua-radius-sm);
|
||||
background: color-mix(in srgb, var(--ua-color-border) 45%, transparent);
|
||||
}
|
||||
.ua-skeleton::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
transform: translateX(-100%);
|
||||
background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ua-color-bg) 65%, transparent), transparent);
|
||||
animation: ua-shimmer 1.4s ease-in-out infinite;
|
||||
}
|
||||
@keyframes ua-shimmer {
|
||||
to {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
.ua-skeleton-text {
|
||||
height: 12px;
|
||||
margin-bottom: var(--ua-space-2);
|
||||
}
|
||||
.ua-skeleton-text.ua-last {
|
||||
width: 60%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ua-skeleton-rect {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
border-radius: var(--ua-radius-md);
|
||||
}
|
||||
.ua-skeleton-circle {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.ua-skeleton-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* —— toast 消息提示:右上角堆叠,转瞬即逝 —— */
|
||||
.ua-toast-host {
|
||||
position: fixed;
|
||||
@@ -707,6 +750,8 @@
|
||||
.ua-alert,
|
||||
.ua-tip,
|
||||
.ua-toast,
|
||||
.ua-skeleton,
|
||||
.ua-skeleton::after,
|
||||
.ua-form-error,
|
||||
.ua-modal,
|
||||
.ua-modal-overlay {
|
||||
|
||||
Reference in New Issue
Block a user