-
Notifications
You must be signed in to change notification settings - Fork 0
/
tostr.css
103 lines (86 loc) · 1.63 KB
/
tostr.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
@import url("https://fonts.googleapis.com/css?family=Raleway");
.toast-message {
position: fixed;
padding: 15px 20px;
border-radius: 9999999px;
font-size: 16px;
transition: 0.5s;
z-index: 999999;
max-width: 40%;
text-align: center;
font-weight: 500;
font-family: "Raleway", sans-serif;
margin: 0;
}
.toast-message.success {
background: rgb(0, 200, 0);
color: #fff;
}
.toast-message.error {
background: rgb(200, 0, 0);
color: #fff;
}
.toast-message.warn {
background: rgb(200, 200, 0);
color: #fff;
}
/* Hidden message */
.toast-message.top {
top: -100%;
left: 50%;
transform: translateX(-50%);
}
.toast-message.top-left {
top: -100%;
left: 10px;
}
.toast-message.top-right {
top: -100%;
right: 10px;
}
.toast-message.bottom {
bottom: -100%;
left: 50%;
transform: translateX(-50%);
}
.toast-message.bottom-left {
bottom: -100%;
left: 10px;
}
.toast-message.bottom-right {
bottom: -100%;
right: 10px;
}
/* Shown message */
.toast-message.top.shown {
top: 10px;
left: 50%;
transform: translateX(-50%);
}
.toast-message.top-left.shown {
top: 10px;
left: 10px;
}
.toast-message.top-right.shown {
top: 10px;
right: 10px;
}
.toast-message.bottom.shown {
bottom: 10px;
left: 50%;
transform: translateX(-50%);
}
.toast-message.bottom-left.shown {
bottom: 10px;
left: 10px;
}
.toast-message.bottom-right.shown {
bottom: 10px;
right: 10px;
}
/* Make the toast wider on smaller screens */
@media screen and (max-width: 768px) {
.toast-message {
max-width: 60%;
}
}