fix(outline): 点击跳转滚动修复——1.点一下到最下面: setTextSelection+focus 在 scrollTo 之后执行, ProseMirror 的 scrollIntoView 覆盖手动 smooth scroll; 修复: 先 setTextSelection(不触发滚动) 再 scrollTo(smooth), focus 延迟到 rAF 下一帧执行, 避免覆盖; 2.暗色遗留: outline-flash-anim 和 outline-item-active 用硬编码 #63b3ed/rgba(99,179,237), 暗色主题下异常; 修复: 改用 var(--accent)/var(--control-border) 主题变量, animation fill-mode:forwards 确保结束完全透明; 3.流畅度: 两条 smooth scroll 冲突导致卡顿, 修复后仅一条 scroll
This commit is contained in:
@@ -59,9 +59,9 @@ html, body, #root { margin: 0; height: 100%; }
|
||||
.tiptap-wrap .ProseMirror .find-match { background: rgba(255, 213, 79, 0.35); border-radius: 2px; }
|
||||
.tiptap-wrap .ProseMirror .find-match-active { background: rgba(255, 145, 0, 0.65); }
|
||||
|
||||
/* FR-O2:标题闪烁高亮 */
|
||||
/* FR-O2:标题闪烁高亮——使用主题变量,确保动画结束完全透明 */
|
||||
@keyframes outline-flash-anim {
|
||||
0% { background: rgba(99, 179, 237, 0.4); }
|
||||
0% { background: var(--flash-bg, rgba(127,127,127,0.3)); }
|
||||
100% { background: transparent; }
|
||||
}
|
||||
.tiptap-wrap .ProseMirror h1.outline-flash,
|
||||
@@ -70,14 +70,14 @@ html, body, #root { margin: 0; height: 100%; }
|
||||
.tiptap-wrap .ProseMirror h4.outline-flash,
|
||||
.tiptap-wrap .ProseMirror h5.outline-flash,
|
||||
.tiptap-wrap .ProseMirror h6.outline-flash {
|
||||
animation: outline-flash-anim 1.5s ease-out;
|
||||
animation: outline-flash-anim 1.2s ease-out forwards;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* FR-O3:大纲当前项高亮 */
|
||||
/* FR-O3:大纲当前项高亮——主题变量适配 */
|
||||
.outline-item-active {
|
||||
background: rgba(99, 179, 237, 0.15) !important;
|
||||
border-left: 2px solid #63b3ed !important;
|
||||
background: var(--control-border) !important;
|
||||
border-left: 2px solid var(--accent) !important;
|
||||
}
|
||||
.tiptap-wrap .ProseMirror blockquote {
|
||||
border-left: 3px solid var(--control-border); padding-left: 12px; color: var(--text-secondary); margin: 0.6em 0;
|
||||
|
||||
Reference in New Issue
Block a user