generated from nhcarrigan/template
feat: toast messages for errors and such
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* @copyright 2026 NHCarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
.toast-container {
|
||||
position: fixed;
|
||||
top: 80px;
|
||||
right: 20px;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.toast {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
cursor: pointer;
|
||||
animation: slideIn 0.3s ease-out;
|
||||
border: 2px solid;
|
||||
background-color: var(--witch-purple);
|
||||
color: var(--moon-white);
|
||||
}
|
||||
|
||||
.toast-error {
|
||||
border-color: #ff4444;
|
||||
background-color: rgba(255, 68, 68, 0.4);
|
||||
}
|
||||
|
||||
.toast-success {
|
||||
border-color: #44ff88;
|
||||
background-color: rgba(68, 255, 136, 0.4);
|
||||
}
|
||||
|
||||
.toast-info {
|
||||
border-color: var(--witch-lavender);
|
||||
background-color: rgba(200, 162, 200, 0.4);
|
||||
}
|
||||
|
||||
.toast-warning {
|
||||
border-color: #ffaa44;
|
||||
background-color: rgba(255, 170, 68, 0.4);
|
||||
}
|
||||
|
||||
.toast-icon {
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.toast-message {
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.toast-close {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--moon-white);
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.toast-close:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
@keyframes slideIn {
|
||||
from {
|
||||
transform: translateX(400px);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user