forked from coderdiaz/vue-status-indicator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
107 lines (87 loc) · 3.86 KB
/
styles.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
:root {
--status-indicator-size: 10px;
--status-indicator-animation-duration: 2s;
--status-indicator-color: rgb(216, 226, 233);
--status-indicator-color-semi: rgba(216, 226, 233, .5);
--status-indicator-color-transparent: rgba(216, 226, 233, 0);
--status-indicator-color-active: rgb(0, 149, 255);
--status-indicator-color-active-semi: rgba(0, 149, 255, .5);
--status-indicator-color-active-transparent: rgba(0, 149, 255, 0);
--status-indicator-color-positive: rgb(75, 210, 143);
--status-indicator-color-positive-semi: rgba(75, 210, 143, .5);
--status-indicator-color-positive-transparent: rgba(75, 210, 143, 0);
--status-indicator-color-intermediary: rgb(255, 170, 0);
--status-indicator-color-intermediary-semi: rgba(255, 170, 0, .5);
--status-indicator-color-intermediary-transparent: rgba(255, 170, 0, 0);
--status-indicator-color-negative: rgb(255, 77, 77);
--status-indicator-color-negative-semi: rgba(255, 77, 77, .5);
--status-indicator-color-negative-transparent: rgba(255, 77, 77, 0);
}
@keyframes status-indicator-pulse {
0% { box-shadow: 0 0 0 0 var(--status-indicator-color-semi); }
70% { box-shadow: 0 0 0 var(--status-indicator-size) var(--status-indicator-color-transparent); }
100% { box-shadow: 0 0 0 0 var(--status-indicator-color-transparent); }
}
@keyframes status-indicator-pulse-active {
0% { box-shadow: 0 0 0 0 var(--status-indicator-color-active-semi); }
70% { box-shadow: 0 0 0 var(--status-indicator-size) var(--status-indicator-color-active-transparent); }
100% { box-shadow: 0 0 0 0 var(--status-indicator-color-active-transparent); }
}
@keyframes status-indicator-pulse-positive {
0% { box-shadow: 0 0 0 0 var(--status-indicator-color-positive-semi); }
70% { box-shadow: 0 0 0 var(--status-indicator-size) var(--status-indicator-color-positive-transparent); }
100% { box-shadow: 0 0 0 0 var(--status-indicator-color-positive-transparent); }
}
@keyframes status-indicator-pulse-intermediary {
0% { box-shadow: 0 0 0 0 var(--status-indicator-color-intermediary-semi); }
70% { box-shadow: 0 0 0 var(--status-indicator-size) var(--status-indicator-color-intermediary-transparent); }
100% { box-shadow: 0 0 0 0 var(--status-indicator-color-intermediary-transparent); }
}
@keyframes status-indicator-pulse-negative {
0% { box-shadow: 0 0 0 0 var(--status-indicator-color-negative-semi); }
70% { box-shadow: 0 0 0 var(--status-indicator-size) var(--status-indicator-color-negative-transparent); }
100% { box-shadow: 0 0 0 0 var(--status-indicator-color-negative-transparent); }
}
.status-indicator {
display: inline-block;
border-radius: 50%;
cursor: pointer;
width: var(--status-indicator-size);
height: var(--status-indicator-size);
background-color: var(--status-indicator-color);
}
.status-indicator[pulse] {
animation-name: status-indicator-pulse;
animation-duration: var(--status-indicator-animation-duration);
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-direction: normal;
animation-delay: 0;
animation-fill-mode: none;
}
.status-indicator[active] {
background-color: var(--status-indicator-color-active);
}
.status-indicator[active][pulse] {
animation-name: status-indicator-pulse-active;
}
.status-indicator[positive] {
background-color: var(--status-indicator-color-positive);
animation-name: status-indicator-pulse-positive;
}
.status-indicator[positive][pulse] {
animation-name: status-indicator-pulse-positive;
}
.status-indicator[intermediary] {
background-color: var(--status-indicator-color-intermediary);
}
.status-indicator[intermediary][pulse] {
animation-name: status-indicator-pulse-intermediary;
}
.status-indicator[negative] {
background-color: var(--status-indicator-color-negative);
animation-name: status-indicator-pulse-negative;
}
.status-indicator[negative][pulse] {
animation-name: status-indicator-pulse-negative;
}