-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
custom-position-animations.css
169 lines (169 loc) · 3.76 KB
/
custom-position-animations.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/*
* Given an ember-notify instance {{ember-notify defaultClass="custom-notify"}}
* the following styles will position the notify box in the top center of the screen.
* They also include custom animations for bouncing in and out.
* These styles were shamelessly copied from https://github.com/Blooie/ember-cli-notifications/tree/master/addon/styles
*/
.custom-notify {
position: fixed;
top: 10px;
right: 0;
left: 0;
z-index: 1060;
width: 80%;
max-width: 400px;
margin: auto;
}
.custom-notify .callout {
font: 14px Helvetica, sans-serif;
position: relative;
overflow: hidden;
border-radius: 4px;
margin-bottom: 2px;
max-height: 800px;
color: #fff;
animation: notification-hide 250ms cubic-bezier(0.33859, -0.42, 1, -0.22), notification-shrink 250ms 250ms cubic-bezier(0.5, 0, 0, 1);
-webkit-animation: notification-hide 250ms cubic-bezier(0.33859, -0.42, 1, -0.22), notification-shrink 250ms 250ms cubic-bezier(0.5, 0, 0, 1);
animation-fill-mode: forwards;
-webkit-animation-fill-mode: forwards;
}
.custom-notify .ember-notify-show {
animation: notification-show 180ms cubic-bezier(0.175, 0.885, 0.32, 1.27499);
-webkit-animation: notification-show 180ms cubic-bezier(0.175, 0.885, 0.32, 1.27499);
}
.custom-notify .custom-notify-icon {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 30px;
color: rgba(255, 255, 255, 0.74);
text-align: center;
}
.custom-notify .custom-notify-icon span {
position: relative;
top: 10px;
}
.custom-notify .message {
display: inline-block;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 40px;
padding-right: 30px;
}
.custom-notify .close {
position: absolute;
top: 10px;
right: 10px;
opacity: .3;
cursor: pointer;
}
.custom-notify .close:hover,
.custom-notify .close:focus {
opacity: 1;
}
.custom-notify .error {
background-color: #e74c3c;
}
.custom-notify .error .custom-notify-icon {
background-color: #ba2c1d;
}
.custom-notify .error .close {
color: #ba2c1d;
}
.custom-notify .success {
background-color: #64ce83;
}
.custom-notify .success .custom-notify-icon {
background-color: #3da95c;
}
.custom-notify .success .close {
color: #3da95c;
}
.custom-notify .info {
background-color: #3ea2ff;
}
.custom-notify .info .custom-notify-icon {
background-color: #067cea;
}
.custom-notify .info .close {
color: #067cea;
}
.custom-notify .warning {
background-color: #ff7f48;
}
.custom-notify .warning .custom-notify-icon {
background-color: #f44e06;
}
.custom-notify .warning .close {
color: #f44e06;
}
/* animations used above */
@keyframes notification-show {
0% {
opacity: 0;
transform: perspective(450px) translate(0, -30px) rotateX(90deg);
}
100% {
opacity: 1;
transform: perspective(450px) translate(0, 0) rotateX(0deg);
}
}
@-webkit-keyframes notification-show {
0% {
opacity: 0;
-webkit-transform: perspective(450px) translate(0, -30px) rotateX(90deg);
}
100% {
opacity: 1;
-webkit-transform: perspective(450px) translate(0, 0) rotateX(0deg);
}
}
@keyframes notification-shrink {
0% {
opacity: 0;
max-height: 800px;
margin-bottom: 2px;
transform: scale(0.8);
}
100% {
opacity: 0;
max-height: 0;
margin-bottom: 0;
transform: scale(0.8);
}
}
@-webkit-keyframes notification-shrink {
0% {
opacity: 0;
max-height: 800px;
margin-bottom: 2px;
-webkit-transform: scale(0.8);
}
100% {
opacity: 0;
max-height: 0;
margin-bottom: 0;
-webkit-transform: scale(0.8);
}
}
@keyframes notification-hide {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(0.8);
}
}
@-webkit-keyframes notification-hide {
0% {
opacity: 1;
-webkit-transform: scale(1);
}
100% {
opacity: 0;
-webkit-transform: scale(0.8);
}
}