iter: d23 alert 标题行 + 可关闭 + role=alert
This commit is contained in:
@@ -697,8 +697,12 @@
|
||||
|
||||
/* —— 提示条 —— */
|
||||
.ua-alert {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--ua-space-2);
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
border-radius: var(--ua-radius-md);
|
||||
border: 1px solid;
|
||||
font-size: var(--ua-font-size-md);
|
||||
@@ -710,6 +714,33 @@
|
||||
transform: translateY(-6px);
|
||||
}
|
||||
}
|
||||
.ua-alert-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.ua-alert-title {
|
||||
margin-bottom: 2px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.ua-alert-close {
|
||||
flex: none;
|
||||
padding: 0 2px;
|
||||
border: none;
|
||||
background: none;
|
||||
color: var(--ua-color-text-muted);
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
cursor: pointer;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
.ua-alert-close:hover {
|
||||
color: var(--ua-color-text);
|
||||
}
|
||||
/* 关闭退场:淡出 + 轻微上移,配合 200ms 后摘除节点 */
|
||||
.ua-alert-out {
|
||||
opacity: 0;
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
.ua-alert-info {
|
||||
border-color: var(--ua-color-accent);
|
||||
background: color-mix(in srgb, var(--ua-color-accent) 10%, transparent);
|
||||
|
||||
Reference in New Issue
Block a user