All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m47s
- Popup now appears above the cursor line (matching reference design) - Header changed to "可能@的内容" - @ character stays visible while popup is open, removed on mention select - All references shown in popup (no dedup filtering) - Fixed zero-rect fallback using temp marker for empty editor Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
153 lines
2.7 KiB
CSS
153 lines
2.7 KiB
CSS
.wrapper {
|
|
flex: 1;
|
|
padding: 4px 0;
|
|
position: relative;
|
|
}
|
|
|
|
.editor {
|
|
background: transparent;
|
|
border: none;
|
|
outline: none;
|
|
color: var(--color-text-primary);
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
width: 100%;
|
|
min-height: 24px;
|
|
max-height: 144px;
|
|
font-family: 'Noto Sans SC', system-ui, sans-serif;
|
|
overflow-y: auto;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.placeholder {
|
|
position: absolute;
|
|
top: 4px;
|
|
left: 0;
|
|
color: #5a5a6a;
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
pointer-events: none;
|
|
font-family: 'Noto Sans SC', system-ui, sans-serif;
|
|
}
|
|
|
|
/* @ mention tag (inserted as contentEditable=false span) */
|
|
.mention {
|
|
display: inline;
|
|
padding: 1px 6px;
|
|
margin: 0 2px;
|
|
border-radius: 4px;
|
|
background: rgba(0, 184, 230, 0.12);
|
|
color: rgba(0, 184, 230, 0.7);
|
|
font-size: 13px;
|
|
cursor: default;
|
|
user-select: none;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.mention:hover {
|
|
background: rgba(0, 184, 230, 0.22);
|
|
color: rgba(0, 184, 230, 0.9);
|
|
}
|
|
|
|
/* Mention popup — appears above cursor */
|
|
.mentionPopup {
|
|
position: absolute;
|
|
z-index: 100;
|
|
background: #1e1e2e;
|
|
border: 1px solid #2a2a3a;
|
|
border-radius: 10px;
|
|
padding: 6px;
|
|
min-width: 200px;
|
|
max-width: 280px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
transform: translateY(-100%);
|
|
animation: fadeInUp 0.12s ease;
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from { opacity: 0; transform: translateY(-100%) translateY(4px); }
|
|
to { opacity: 1; transform: translateY(-100%); }
|
|
}
|
|
|
|
.mentionHeader {
|
|
padding: 4px 8px 6px;
|
|
font-size: 11px;
|
|
color: #5a5a6a;
|
|
border-bottom: 1px solid #2a2a3a;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.mentionItem {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
border: none;
|
|
background: transparent;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
text-align: left;
|
|
}
|
|
|
|
.mentionItem:hover {
|
|
background: rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
.mentionThumb {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
background: #2a2a3a;
|
|
}
|
|
|
|
.thumbMedia {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.mentionLabel {
|
|
flex: 1;
|
|
color: var(--color-text-primary);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.mentionType {
|
|
color: #5a5a6a;
|
|
font-size: 11px;
|
|
}
|
|
|
|
/* Hover preview tooltip */
|
|
.previewTooltip {
|
|
position: absolute;
|
|
z-index: 200;
|
|
transform: translate(-50%, -100%);
|
|
background: #1e1e2e;
|
|
border: 1px solid #2a2a3a;
|
|
border-radius: 10px;
|
|
padding: 6px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
|
|
pointer-events: none;
|
|
animation: fadeIn 0.1s ease;
|
|
}
|
|
|
|
.previewMedia {
|
|
display: block;
|
|
width: 160px;
|
|
height: 100px;
|
|
object-fit: cover;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.previewLabel {
|
|
text-align: center;
|
|
color: #8a8a9a;
|
|
font-size: 11px;
|
|
margin-top: 4px;
|
|
}
|