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