This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
/
simpleNotification.css
151 lines (129 loc) · 2.27 KB
/
simpleNotification.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
151
@keyframes fadeout {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes shorten {
from {
width: 100%;
}
to {
width: 0;
}
}
.gn-wrapper {
position: fixed;
overflow: hidden;
pointer-events: none;
display: flex;
flex-direction: column;
flex-wrap: wrap;
z-index: 1080;
}
.gn-top-right,
.gn-bottom-right {
align-items: flex-end;
}
.gn-top-left,
.gn-bottom-left {
align-items: flex-start;
}
.gn-top-right {
top: 0;
right: 0;
}
.gn-top-left {
top: 0;
left: 0;
}
.gn-bottom-right {
bottom: 0;
right: 0;
}
.gn-bottom-left {
bottom: 0;
left: 0;
}
.gn-notification {
/*border: 1px solid black;*/
box-shadow: 1px 1px 3px black;
border-radius: 3px;
overflow: hidden;
margin: 1rem;
cursor: pointer;
animation-duration: 1000ms;
animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
animation-fill-mode: forwards;
pointer-events: all;
min-width: 20rem;
max-width: 30rem;
}
.gn-notification h1 {
background-color: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}
.gn-fadeout {
animation-name: fadeout;
animation-timing-function: linear;
animation-fill-mode: forwards;
}
.gn-content {
display: flex;
flex: 1;
align-content: space-between;
align-items: center;
}
.gn-content img {
max-width: 40%;
max-height: 20rem;
flex-shrink: 0;
}
.gn-content p {
max-width: 100%;
white-space: pre-line;
}
.gn-content img:only-child,
.gn-content p:only-child {
max-width: 100%;
}
.gn-notification h1,
.gn-content p {
padding: 0.5rem;
margin: 0;
}
.gn-lifespan {
display: block;
height: 3px;
width: 100%;
background-color: #4dd0e1;
transition-property: width;
transition-timing-function: linear;
}
.gn-extinguish {
animation-name: shorten;
animation-timing-function: linear;
animation-fill-mode: forwards;
}
.gn-success {
background-color: #689f38;
color: white;
}
.gn-info {
background-color: #0288d1;
color: white;
}
.gn-error {
background-color: #e53935;
color: white;
}
.gn-warning {
background-color: #ff8f00;
color: white;
}
.gn-message {
background-color: #333333;
color: white;
}