iter(g132): 新增 @提及输入 mentions
This commit is contained in:
@@ -4151,3 +4151,80 @@ h5.ua-type-title { font-size: var(--ua-font-size-md); }
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* —— @提及输入:弹层贴输入框下沿,候选行高亮走淡色底 —— */
|
||||
.ua-mentions {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
.ua-mentions-input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: var(--ua-space-2) var(--ua-space-3);
|
||||
border: 1px solid var(--ua-color-border);
|
||||
border-radius: var(--ua-radius-md);
|
||||
background: var(--ua-color-surface);
|
||||
color: var(--ua-color-text);
|
||||
font: inherit;
|
||||
font-size: var(--ua-font-size-md);
|
||||
line-height: 1.6;
|
||||
resize: vertical;
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
.ua-mentions-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--ua-color-accent);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 22%, transparent);
|
||||
}
|
||||
.ua-mentions-pop {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: calc(100% + 4px);
|
||||
z-index: 30;
|
||||
display: none;
|
||||
max-height: 220px;
|
||||
overflow-y: auto;
|
||||
padding: var(--ua-space-1);
|
||||
border: 1px solid var(--ua-color-border);
|
||||
border-radius: var(--ua-radius-md);
|
||||
background: var(--ua-color-surface);
|
||||
box-shadow: 0 12px 28px color-mix(in srgb, var(--ua-color-text) 16%, transparent);
|
||||
}
|
||||
.ua-mentions.is-open .ua-mentions-pop {
|
||||
display: block;
|
||||
animation: ua-mentions-in 0.15s ease;
|
||||
}
|
||||
.ua-mentions-item {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: var(--ua-space-2);
|
||||
padding: var(--ua-space-2) var(--ua-space-2);
|
||||
border-radius: var(--ua-radius-sm);
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
.ua-mentions-item.is-active {
|
||||
background: color-mix(in srgb, var(--ua-color-accent) 10%, transparent); /* 选中态低视觉比重 */
|
||||
}
|
||||
.ua-mentions-name {
|
||||
color: var(--ua-color-text);
|
||||
}
|
||||
.ua-mentions-desc {
|
||||
color: var(--ua-color-text-muted);
|
||||
font-size: var(--ua-font-size-sm);
|
||||
}
|
||||
@keyframes ua-mentions-in {
|
||||
from { opacity: 0; transform: translateY(-4px); }
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.ua-mentions.is-open .ua-mentions-pop {
|
||||
animation: none;
|
||||
}
|
||||
.ua-mentions-input,
|
||||
.ua-mentions-item {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user