-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path_skeleton.scss
More file actions
57 lines (49 loc) · 1.31 KB
/
_skeleton.scss
File metadata and controls
57 lines (49 loc) · 1.31 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
/* @docs */
$skeleton-bg-color: $dark-bg-subtle !default;
$skeleton-bg: linear-gradient(
90deg,
$skeleton-bg-color 25%,
rgba($skeleton-bg-color, 0.5) 50%,
$skeleton-bg-color 75%
) !default;
$skeleton-duration: 1.5s !default;
$skeleton-margin: 0.5rem 0 0 0 !default;
/* @docs */
@keyframes skeleton-loading {
0% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
.skeleton {
--#{$prefix}skeleton-bg: #{$skeleton-bg};
--#{$prefix}skeleton-duration: #{$skeleton-duration};
--#{$prefix}skeleton-margin: #{$skeleton-margin};
display: inline-flex;
flex-direction: column;
vertical-align: middle;
width: 100%;
.skeleton-item {
width: 100%;
background-image: var(--#{$prefix}skeleton-bg);
margin: var(--#{$prefix}skeleton-margin);
line-height: 1em;
&.animated {
background-size: 400% 100%;
animation-name: skeleton-loading;
animation-iteration-count: infinite;
animation-duration: var(--#{$prefix}skeleton-duration);
}
&::after {
content: "\00a0";
}
// size variants
@each $name, $value in $sizes {
&.size-#{$name} {
line-height: $value;
}
}
}
}