fix(frontend): 修复 aardio 注释着色、代码行距与折叠 hydration
注释不再被运算符拆开;去掉 grid 行 min-height;挂载后再折叠以避免 SSR/CSR 不一致。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1725,13 +1725,23 @@ a.j13-mention-token:hover {
|
||||
color: inherit;
|
||||
min-width: 100%;
|
||||
}
|
||||
/* rehype-pretty-code grid 行:保证每行有高度,避免折叠/展开后大片空白 */
|
||||
/* grid 代码行:勿设 min-height,否则会把行距撑得很大并在底部留白 */
|
||||
.prose-content pre code[style*="grid"] {
|
||||
display: grid;
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
}
|
||||
.prose-content pre code[style*="grid"] > [data-line],
|
||||
.prose-content .md-code-shiki-host code > .line,
|
||||
.prose-content .md-code-shiki-host code > [data-line] {
|
||||
min-height: 1.65em;
|
||||
line-height: 1.65;
|
||||
}
|
||||
/* 空行仍占一行高度(pretty-code onVisitLine 会塞空格) */
|
||||
.prose-content pre code[style*="grid"] > [data-line]:empty::after,
|
||||
.prose-content .md-code-shiki-host code > .line:empty::after {
|
||||
content: " ";
|
||||
white-space: pre;
|
||||
}
|
||||
.prose-content blockquote {
|
||||
border-left: 3px solid var(--accent);
|
||||
background: var(--accent-soft);
|
||||
|
||||
Reference in New Issue
Block a user