fix: stabilize code block font to prevent jitter
This commit is contained in:
parent
a089cdd853
commit
e256182304
@ -631,6 +631,22 @@
|
|||||||
padding: 0 20px 0 15px;
|
padding: 0 20px 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-output pre {
|
||||||
|
font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', 'Menlo', 'Monaco', 'Courier New', monospace !important;
|
||||||
|
font-variant-ligatures: none;
|
||||||
|
font-feature-settings: 'liga' 0, 'calt' 0;
|
||||||
|
line-height: 1.55;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-output pre code {
|
||||||
|
font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', 'Menlo', 'Monaco', 'Courier New', monospace !important;
|
||||||
|
font-variant-ligatures: none;
|
||||||
|
font-feature-settings: 'liga' 0, 'calt' 0;
|
||||||
|
line-height: 1.55;
|
||||||
|
text-shadow: none;
|
||||||
|
animation: none !important; /* 防止外部动画样式影响代码块,导致视觉抖动 */
|
||||||
|
}
|
||||||
|
|
||||||
.text-output .text-content table {
|
.text-output .text-content table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
@ -757,12 +773,22 @@
|
|||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
|
font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', 'Menlo', 'Monaco', 'Courier New', monospace !important;
|
||||||
|
font-variant-ligatures: none;
|
||||||
|
font-feature-settings: 'liga' 0, 'calt' 0;
|
||||||
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
.code-block-wrapper pre code {
|
.code-block-wrapper pre code {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', 'Menlo', 'Monaco', 'Courier New', monospace !important;
|
||||||
|
font-variant-ligatures: none;
|
||||||
|
font-feature-settings: 'liga' 0, 'calt' 0;
|
||||||
|
line-height: 1.55;
|
||||||
|
text-shadow: none;
|
||||||
|
animation: none !important; /* 避免被其他动画样式污染导致行距抖动 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.streaming-text {
|
.streaming-text {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user