1
1
: root {
2
- --status-indicator-color : 216 , 226 , 233 ; /* #D8E2E9 */
3
- --status-indicator-color-active : 0 , 149 , 255 ; /* #0095FF */
4
- --status-indicator-color-positive : 75 , 210 , 143 ; /* #4BD28F */
5
- --status-indicator-color-intermediary : 255 , 170 , 0 ; /* #FFAA00 */
6
- --status-indicator-color-negative : 255 , 77 , 77 ; /* #FF4D4D */
7
2
--status-indicator-size : 10px ;
8
- --status-indicator-animation-time : 2s ;
9
- --status-indicator-pulse-start-alpha : .5 ;
10
- --status-indicator-pulse-end-alpha : 0 ;
3
+
4
+ --status-indicator-animation-duration : 2s ;
5
+ --status-indicator-pulse-semi-alpha : .5 ;
6
+
7
+ --status-indicator-color : rgb (216 , 226 , 233 );
8
+ --status-indicator-color-semi : rgba (216 , 226 , 233 , var (--status-indicator-pulse-semi-alpha ));
9
+ --status-indicator-color-transparent : rgba (216 , 226 , 233 , 0 );
10
+
11
+ --status-indicator-color-active : rgb (0 , 149 , 255 );
12
+ --status-indicator-color-active-semi : rgba (0 , 149 , 255 , var (--status-indicator-pulse-semi-alpha ));
13
+ --status-indicator-color-active-transparent : rgba (0 , 149 , 255 , 0 );
14
+
15
+ --status-indicator-color-positive : rgb (75 , 210 , 143 );
16
+ --status-indicator-color-positive-semi : rgba (75 , 210 , 143 , var (--status-indicator-pulse-semi-alpha ));
17
+ --status-indicator-color-positive-transparent : rgba (75 , 210 , 143 , 0 );
18
+
19
+ --status-indicator-color-intermediary : rgb (255 , 170 , 0 );
20
+ --status-indicator-color-intermediary-semi : rgba (255 , 170 , 0 , var (--status-indicator-pulse-semi-alpha ));
21
+ --status-indicator-color-intermediary-transparent : rgba (255 , 170 , 0 , 0 );
22
+
23
+ --status-indicator-color-negative : rgb (255 , 77 , 77 );
24
+ --status-indicator-color-negative-semi : rgba (255 , 77 , 77 , var (--status-indicator-pulse-semi-alpha ));
25
+ --status-indicator-color-negative-transparent : rgba (255 , 77 , 77 , 0 );
11
26
}
12
27
13
28
@keyframes status-indicator-pulse {
14
- 0% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color ) , var ( --status-indicator-pulse-start-alpha ) ); }
15
- 70% { box-shadow : 0 0 0 var (--status-indicator-size ) rgba ( var (--status-indicator-color ) , var ( --status-indicator-pulse-end-alpha ) ); }
16
- 100% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color ) , var ( --status-indicator-pulse-end-alpha ) ); }
29
+ 0% { box-shadow : 0 0 0 0 var (--status-indicator-color-semi ); }
30
+ 70% { box-shadow : 0 0 0 var (--status-indicator-size ) var (--status-indicator-color-transparent ); }
31
+ 100% { box-shadow : 0 0 0 0 var (--status-indicator-color-transparent ); }
17
32
}
18
33
19
34
@keyframes status-indicator-pulse-active {
20
- 0% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-active ) , var ( --status-indicator-pulse-start-alpha ) ); }
21
- 70% { box-shadow : 0 0 0 var (--status-indicator-size ) rgba ( var (--status-indicator-color-active ) , var ( --status-indicator-pulse-end-alpha ) ); }
22
- 100% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-active ) , var ( --status-indicator-pulse-end-alpha ) ); }
35
+ 0% { box-shadow : 0 0 0 0 var (--status-indicator-color-active-semi ); }
36
+ 70% { box-shadow : 0 0 0 var (--status-indicator-size ) var (--status-indicator-color-active-transparent ); }
37
+ 100% { box-shadow : 0 0 0 0 var (--status-indicator-color-active-transparent ); }
23
38
}
24
39
25
40
@keyframes status-indicator-pulse-positive {
26
- 0% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-positive ) , var ( --status-indicator-pulse-start-alpha ) ); }
27
- 70% { box-shadow : 0 0 0 var (--status-indicator-size ) rgba ( var (--status-indicator-color-positive ) , var ( --status-indicator-pulse-end-alpha ) ); }
28
- 100% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-positive ) , var ( --status-indicator-pulse-end-alpha ) ); }
41
+ 0% { box-shadow : 0 0 0 0 var (--status-indicator-color-positive-semi ); }
42
+ 70% { box-shadow : 0 0 0 var (--status-indicator-size ) var (--status-indicator-color-positive-transparent ); }
43
+ 100% { box-shadow : 0 0 0 0 var (--status-indicator-color-positive-transparent ); }
29
44
}
30
45
31
46
@keyframes status-indicator-pulse-intermediary {
32
- 0% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-intermediary ) , var ( --status-indicator-pulse-start-alpha ) ); }
33
- 70% { box-shadow : 0 0 0 var (--status-indicator-size ) rgba ( var (--status-indicator-color-intermediary ) , var ( --status-indicator-pulse-end-alpha ) ); }
34
- 100% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-intermediary ) , var ( --status-indicator-pulse-end-alpha ) ); }
47
+ 0% { box-shadow : 0 0 0 0 var (--status-indicator-color-intermediary-semi ); }
48
+ 70% { box-shadow : 0 0 0 var (--status-indicator-size ) var (--status-indicator-color-intermediary-transparent ); }
49
+ 100% { box-shadow : 0 0 0 0 var (--status-indicator-color-intermediary-transparent ); }
35
50
}
36
51
37
52
@keyframes status-indicator-pulse-negative {
38
- 0% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-negative ) , var ( --status-indicator-pulse-start-alpha ) ); }
39
- 70% { box-shadow : 0 0 0 var (--status-indicator-size ) rgba ( var (--status-indicator-color-negative ) , var ( --status-indicator-pulse-end-alpha ) ); }
40
- 100% { box-shadow : 0 0 0 0 rgba ( var (--status-indicator-color-negative ) , var ( --status-indicator-pulse-end-alpha ) ); }
53
+ 0% { box-shadow : 0 0 0 0 var (--status-indicator-color-negative-semi ); }
54
+ 70% { box-shadow : 0 0 0 var (--status-indicator-size ) var (--status-indicator-color-negative-transparent ); }
55
+ 100% { box-shadow : 0 0 0 0 var (--status-indicator-color-negative-transparent ); }
41
56
}
42
57
43
58
status-indicator {
@@ -46,23 +61,29 @@ status-indicator {
46
61
cursor : pointer;
47
62
width : var (--status-indicator-size );
48
63
height : var (--status-indicator-size );
49
- background-color : rgb ( var (--status-indicator-color ) );
64
+ background-color : var (--status-indicator-color );
50
65
}
51
66
52
67
status-indicator [pulse ] {
53
- animation : status-indicator-pulse var (--status-indicator-animation-time ) infinite;
68
+ animation-name : status-indicator-pulse;
69
+ animation-duration : var (--status-indicator-animation-duration );
70
+ animation-timing-function : ease-in-out;
71
+ animation-iteration-count : infinite;
72
+ animation-direction : normal;
73
+ animation-delay : 0 ;
74
+ animation-fill-mode : none;
54
75
}
55
76
56
77
status-indicator [active ] {
57
- background-color : rgb ( var (--status-indicator-color-active , # 0095FF ) );
78
+ background-color : var (--status-indicator-color-active );
58
79
}
59
80
60
81
status-indicator [active ][pulse ] {
61
82
animation-name : status-indicator-pulse-active;
62
83
}
63
84
64
85
status-indicator [positive ] {
65
- background-color : rgb ( var (--status-indicator-color-positive , # 4BD28F ) );
86
+ background-color : var (--status-indicator-color-positive );
66
87
animation-name : status-indicator-pulse-positive;
67
88
}
68
89
@@ -71,15 +92,15 @@ status-indicator[positive][pulse] {
71
92
}
72
93
73
94
status-indicator [intermediary ] {
74
- background-color : rgb ( var (--status-indicator-color-intermediary , # FFAA00 ) );
95
+ background-color : var (--status-indicator-color-intermediary );
75
96
}
76
97
77
98
status-indicator [intermediary ][pulse ] {
78
99
animation-name : status-indicator-pulse-intermediary;
79
100
}
80
101
81
102
status-indicator [negative ] {
82
- background-color : rgb ( var (--status-indicator-color-negative , # FF4D4D ) );
103
+ background-color : var (--status-indicator-color-negative );
83
104
animation-name : status-indicator-pulse-negative;
84
105
}
85
106
0 commit comments