fix(frontend): 代码块折叠加高度动画,头部在视口外时滚动跟随

收起/展开用 max-height 过渡;头部仍在视口内不改滚动,在视口外则钉住收起按钮随动画跟滚。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-16 06:49:01 +08:00
parent 809d8f1df7
commit c6df1b3b7e
2 changed files with 157 additions and 21 deletions

View File

@@ -1881,6 +1881,12 @@ a.j13-mention-token:hover {
height: 2.75rem;
pointer-events: none;
background: linear-gradient(to bottom, transparent, var(--panel-2));
transition: opacity 0.28s ease;
}
@media (prefers-reduced-motion: reduce) {
.prose-content .md-code-body {
transition: none !important;
}
}
.prose-content .md-code-fold {
display: flex;