Skip to content
Source
Sign inSign up
samwillis/one-million-boxes
Open History to see the last commit

ErrorToast.css

63 lines1.1 KB

1.error-toast {
2 position: fixed;
3 bottom: 80px;
4 left: 50%;
5 transform: translateX(-50%);
6 z-index: 100;
7 padding: 12px 20px;
8 background: #dc2626;
9 border-radius: 8px;
10 color: #fff;
11 font-size: 14px;
12 font-weight: 500;
13 box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
14 display: flex;
15 align-items: center;
16 gap: 10px;
18​
19.error-toast--visible {
20 animation: error-toast-in 0.3s ease-out forwards;
22​
23.error-toast--hidden {
24 animation: error-toast-out 0.3s ease-in forwards;
26​
27@keyframes error-toast-in {
28 from {
29 opacity: 0;
30 transform: translateX(-50%) translateY(20px);
31 }
32 to {
33 opacity: 1;
34 transform: translateX(-50%) translateY(0);
35 }
37​
38@keyframes error-toast-out {
39 from {
40 opacity: 1;
41 transform: translateX(-50%) translateY(0);
42 }
43 to {
44 opacity: 0;
45 transform: translateX(-50%) translateY(20px);
46 }
48​
49.error-toast__icon {
50 display: flex;
51 align-items: center;
52 justify-content: center;
53 width: 20px;
54 height: 20px;
55 background: rgba(255, 255, 255, 0.2);
56 border-radius: 50%;
57 font-weight: 700;
58 font-size: 12px;
60​
61.error-toast__message {
62 flex: 1;