This repository was archived by the owner on Feb 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoast.css
More file actions
108 lines (92 loc) · 2.02 KB
/
toast.css
File metadata and controls
108 lines (92 loc) · 2.02 KB
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
.toast-container {
display: flex;
position: absolute;
flex-direction: column;
background-color: transparent;
z-index: 1000;
width: 312px;
margin: .75rem;
gap: 1rem;
}
.toast-container[data-position^="top-"] {
top: 0;
}
.toast-container[data-position^="bottom-"] {
bottom: 0;
}
.toast-container[data-position$="-left"] {
left: 0;
}
.toast-container[data-position$="-right"] {
right: 0;
}
.toast-container[data-position$="-center"] {
left: 50%;
transform: translateX(-45%);
}
.toast {
box-sizing: border-box;
padding: .5rem;
background-color: white;
border-radius: .25rem;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
position: relative;
display: flex;
justify-content: space-between;
flex-direction: row;
height: 64px;
direction: ltr;
cursor: pointer;
transition: transform 300ms ease-in-out;
}
.toast-container .toast.toast-show {
transform: translate(0, 0) !important;
}
.toast-container[data-position$="-left"] .toast {
transform: translateX(-110%);
}
.toast-container[data-position$="-right"] .toast {
transform: translateX(110%);
}
.toast-container[data-position="top-center"] .toast {
transform: translateY(-110vh);
}
.toast-container[data-position="bottom-center"] .toast {
transform: translateY(110vh);
}
.toast-body {
flex: 1;
margin: auto 0;
display: flex;
width: 100%;
align-items: center;
padding: .2rem;
}
.toast--closeBtn {
background-color: transparent;
outline: none;
align-self: flex-start;
cursor: pointer;
padding: 0;
border: none;
}
.toast--closeBtn > svg {
height: 16px;
width: 14px;
fill: #ccc;
transition: fill .2s ease-in-out;
}
.toast--closeBtn:hover > svg {
fill: #8a8a8a;
}
.toast-progressbar {
position: absolute;
left: 0;
bottom: 0;
width: calc(100% * var(--progress));
height: .3rem;
overflow: hidden;
z-index: 1000;
border-radius: 0 0 .25rem .25rem;
background-color: var(--progress-color);
}