@@ -0,0 +1,77 @@
|
||||
/* Toast 提示:对齐站点深色主题,仅成功 / 失败两种状态 */
|
||||
|
||||
.site-toast {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 16px;
|
||||
z-index: 400;
|
||||
transform: translateX(-50%);
|
||||
pointer-events: none;
|
||||
max-width: min(92vw, 420px);
|
||||
}
|
||||
|
||||
.site-toast[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-toast__panel {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 44px;
|
||||
padding: 12px 18px;
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--line);
|
||||
background: var(--bg);
|
||||
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
|
||||
color: var(--text);
|
||||
opacity: 0;
|
||||
transform: translateY(-8px);
|
||||
transition: opacity 0.22s ease, transform 0.22s ease;
|
||||
}
|
||||
|
||||
.site-toast.is-visible .site-toast__panel {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.site-toast__icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
flex-shrink: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-toast__icon[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.site-toast.is-success .site-toast__icon[data-toast-icon-success]:not([hidden]),
|
||||
.site-toast.is-error .site-toast__icon[data-toast-icon-error]:not([hidden]) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-toast__text {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.45;
|
||||
font-weight: 500;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.site-toast.is-success .site-toast__panel {
|
||||
border-color: rgba(233, 201, 119, 0.35);
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.site-toast.is-error .site-toast__panel {
|
||||
border-color: rgba(255, 90, 95, 0.4);
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.site-toast {
|
||||
top: 16px;
|
||||
bottom: auto;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user