-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathSkeleton.module.css
More file actions
45 lines (41 loc) · 795 Bytes
/
Skeleton.module.css
File metadata and controls
45 lines (41 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.skeleton {
background-color: #e2e8f0;
border-radius: 4px;
position: relative;
overflow: hidden;
}
.skeleton::after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform: translateX(-100%);
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0) 0,
rgba(255, 255, 255, 0.2) 20%,
rgba(255, 255, 255, 0.5) 60%,
rgba(255, 255, 255, 0)
);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
100% {
transform: translateX(100%);
}
}
/* Dark mode support */
.dark .skeleton {
background-color: #334155;
}
.dark .skeleton::after {
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0) 0,
rgba(255, 255, 255, 0.05) 20%,
rgba(255, 255, 255, 0.2) 60%,
rgba(255, 255, 255, 0)
);
}