-
Notifications
You must be signed in to change notification settings - Fork 841
/
_loading_chart.scss
118 lines (96 loc) · 2.06 KB
/
_loading_chart.scss
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
.euiLoadingChart {
height: $euiSizeXL;
z-index: 500;
overflow: hidden;
display: inline-block;
}
/**
* 1. Without the animation, the bars are all the same height,
* so we apply transforms only if they can't animate
*/
.euiLoadingChart__bar {
height: 100%;
width: $euiSizeS;
display: inline-block;
margin-bottom: -$euiSize;
margin-left: $euiSizeXS / 2;
// sass-lint:disable-block mixins-before-declarations
@include euiCanAnimate {
animation: euiLoadingChart 1s infinite;
}
&:nth-child(1) {
background-color: $euiColorVis0;
@include euiCantAnimate {
transform: translateY(66%); /* 1 */
}
}
&:nth-child(2) {
background-color: $euiColorVis1;
animation-delay: .1s;
@include euiCantAnimate {
transform: translateY(44%); /* 1 */
}
}
&:nth-child(3) {
background-color: $euiColorVis2;
animation-delay: .2s;
@include euiCantAnimate {
transform: translateY(22%); /* 1 */
}
}
&:nth-child(4) {
background-color: $euiColorVis3;
animation-delay: .3s;
}
}
.euiLoadingChart--mono {
.euiLoadingChart__bar {
&:nth-child(1) {
background-color: $euiColorLightShade;
}
&:nth-child(2) {
background-color: shadeOrTint($euiColorLightShade, 4%, 4%);
}
&:nth-child(3) {
background-color: shadeOrTint($euiColorLightShade, 8%, 8%);
}
&:nth-child(4) {
background-color: shadeOrTint($euiColorLightShade, 12%, 12%);
}
}
}
.euiLoadingChart--medium {
height: $euiSize;
> span {
width: $euiSizeXS / 2;
margin-left: $euiSizeXS / 2;
margin-bottom: $euiSizeS;
}
}
.euiLoadingChart--large {
height: $euiSizeL;
> span {
width: $euiSizeXS;
margin-left: $euiSizeXS / 2;
margin-bottom: $euiSizeL / 2;
}
}
.euiLoadingChart--xLarge {
height: $euiSizeXL;
> span {
width: $euiSizeS;
margin-left: $euiSizeXS;
margin-bottom: $euiSizeXL / 2;
}
}
@keyframes euiLoadingChart {
0% {
transform: translateY(0);
}
50% {
transform: translateY(66%);
}
100% {
transform: translateY(0);
}
}