-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogress.css
executable file
·150 lines (130 loc) · 4.4 KB
/
progress.css
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
:root {
--progress-bar-gradient-width-1: 0.5rem;
--progress-bar-gradient-width-2: 1rem;
--progress-bar-gradient-color: var(--primary-color);
--progress-bar-gradient-color-light: var(--primary-color-light);
--progress-bar-width-small: var(--width-small);
--progress-bar-width-medium: var(--width-medium);
--progress-bar-width-large: var(--width-large);
--progress-bar-height: 0.5rem;
}
.cosmo-progress-bar__label {
font-size: var(--font-size);
color: var(--black);
display: block;
}
.cosmo-progress-bar {
--progress-bar-background: repeating-linear-gradient(
-45deg,
var(--primary-color),
var(--primary-color) var(--progress-bar-gradient-width-1),
var(--primary-color-light) var(--progress-bar-gradient-width-1),
var(--primary-color-light) var(--progress-bar-gradient-width-2)
);
display: inline-block;
vertical-align: baseline;
appearance: none;
width: var(--progress-bar-width-medium);
height: var(--progress-bar-height);
overflow: hidden;
border: 0;
background-color: var(--control-border-color);
color: var(--primary-color);
border-radius: var(--border-radius);
}
.cosmo-progress-bar.is--small {
width: var(--progress-bar-width-small);
}
.cosmo-progress-bar.is--large {
width: var(--progress-bar-width-large);
}
.cosmo-progress-bar.is--negative {
--progress-bar-background: repeating-linear-gradient(
-45deg,
var(--negative-color),
var(--negative-color) var(--progress-bar-gradient-width-1),
var(--negative-color-dark) var(--progress-bar-gradient-width-1),
var(--negative-color-dark) var(--progress-bar-gradient-width-2)
);
}
.cosmo-progress-bar.is--positive {
--progress-bar-background: repeating-linear-gradient(
-45deg,
var(--positive-color),
var(--positive-color) var(--progress-bar-gradient-width-1),
var(--positive-color-dark) var(--progress-bar-gradient-width-1),
var(--positive-color-dark) var(--progress-bar-gradient-width-2)
);
}
.cosmo-progress-bar.is--warning {
--progress-bar-background: repeating-linear-gradient(
-45deg,
var(--warning-color),
var(--warning-color) var(--progress-bar-gradient-width-1),
var(--warning-color-dark) var(--progress-bar-gradient-width-1),
var(--warning-color-dark) var(--progress-bar-gradient-width-2)
);
}
.cosmo-progress-bar.is--information {
--progress-bar-background: repeating-linear-gradient(
-45deg,
var(--information-color),
var(--information-color) var(--progress-bar-gradient-width-1),
var(--information-color-dark) var(--progress-bar-gradient-width-1),
var(--information-color-dark) var(--progress-bar-gradient-width-2)
);
}
.cosmo-progress-bar::-webkit-progress-bar {
background: transparent;
}
.cosmo-progress-bar[value]::-webkit-progress-value {
border-radius: var(--border-radius);
background: var(--progress-bar-background);
}
.cosmo-progress-bar::-moz-progress-bar {
border-radius: var(--border-radius);
background: var(--progress-bar-background);
}
@media (prefers-reduced-motion: no-preference) {
.cosmo-progress-bar:indeterminate {
--progress-background: var(--control-border-color)
linear-gradient(to right, var(--primary-color) 30%, var(--control-border-color) 30%) top
left/150% 150% no-repeat;
animation: progressIndeterminate 1s linear infinite;
background: var(--progress-background);
}
.cosmo-progress-bar.is--negative:indeterminate {
--progress-background: var(--control-border-color)
linear-gradient(to right, var(--negative-color) 30%, var(--control-border-color) 30%) top
left/150% 150% no-repeat;
}
.cosmo-progress-bar.is--positive:indeterminate {
--progress-background: var(--control-border-color)
linear-gradient(to right, var(--positive-color) 30%, var(--control-border-color) 30%) top
left/150% 150% no-repeat;
}
.cosmo-progress-bar.is--warning:indeterminate {
--progress-background: var(--control-border-color)
linear-gradient(to right, var(--warning-color) 30%, var(--control-border-color) 30%) top
left/150% 150% no-repeat;
}
.cosmo-progress-bar.is--information:indeterminate {
--progress-background: var(--control-border-color)
linear-gradient(to right, var(--information-color) 30%, var(--control-border-color) 30%) top
left/150% 150% no-repeat;
}
.cosmo-progress-bar:indeterminate[value]::-webkit-progress-value {
background: transparent;
}
.cosmo-progress-bar:indeterminate::-moz-progress-bar {
background: transparent;
}
}
@keyframes progressIndeterminate {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}