UNPKG

styleui-components

Version:

Lightweight, modular UI component library with zero dependencies

92 lines (79 loc) 1.71 kB
/** * StyleUI Styles - Toast * Component-specific styles for toast notifications. */ .toast-container { position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: var(--z-tooltip); display: flex; flex-direction: column; gap: var(--space-3); pointer-events: none; } .toast { display: flex; align-items: center; gap: var(--space-3); min-width: 300px; max-width: 500px; padding: var(--space-4); background: var(--bg-layer-4); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); position: relative; overflow: hidden; pointer-events: all; /* Animation is now handled by utility classes */ } .toast.hiding { /* The .anim-slideOutRight class will be added by JS to trigger the hiding animation */ } .toast-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .toast-message { flex: 1; font-size: var(--text-sm); } .toast-close { flex-shrink: 0; cursor: pointer; opacity: 0.5; transition: opacity var(--transition-fast); } .toast-close:hover { opacity: 1; } .toast-action { margin-left: var(--space-3); } .toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: currentColor; opacity: 0.3; animation: progress var(--toast-duration, 5000ms) linear; } .toast-success { background: var(--success); color: var(--grey-800); } .toast-error { background: var(--error); color: var(--grey-800); } .toast-warning { background: var(--warning); color: var(--grey-800); } .toast-info { background: var(--info); color: var(--grey-800); }