fix gists code highlight

This commit is contained in:
DefectingCat
2023-11-10 11:04:38 +08:00
parent 6348390a68
commit 222da7a336
2 changed files with 36 additions and 32 deletions

View File

@ -128,3 +128,39 @@ html {
.DocSearch-Button { .DocSearch-Button {
transition: all 0.3s ease-out; transition: all 0.3s ease-out;
} }
/* code */
code.hljs {
background: unset !important;
}
pre,
code {
font-family:
var(--font-jetbrains-mono),
-apple-system,
'DejaVu Sans Mono',
monospace;
}
pre {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
border-radius: 0.3em;
@apply bg-white dark:bg-rua-gray-800;
/* font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono',
monospace; */
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
line-height: 1.5;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}

View File

@ -179,38 +179,6 @@ h6:hover::before {
border-radius: 6px; border-radius: 6px;
} }
#article pre,
code {
font-family:
var(--font-jetbrains-mono),
-apple-system,
'DejaVu Sans Mono',
monospace;
}
#article pre {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
border-radius: 0.3em;
@apply bg-white dark:bg-rua-gray-800;
/* font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono',
monospace; */
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
line-height: 1.5;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
#article pre > code { #article pre > code {
padding: 0; padding: 0;
margin: 0; margin: 0;