docs: improve sourcecode styles (#38675)

This commit is contained in:
Peach 2022-11-18 14:47:37 +08:00 committed by GitHub
parent f9b452017b
commit 7e6d6e3f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,6 +287,10 @@ const GlobalStyles = () => {
.markdown .dumi-default-source-code { .markdown .dumi-default-source-code {
background-color: ${token.siteMarkdownCodeBg}; background-color: ${token.siteMarkdownCodeBg};
> pre.prism-code {
font-size: 13px;
line-height: 2;
}
} }
.markdown .dumi-default-table-content > table, .markdown .dumi-default-table-content > table,
@ -751,60 +755,62 @@ const GlobalStyles = () => {
opacity: 0.7; opacity: 0.7;
} }
.token.property, .markdown {
.token.tag, .token.property,
.token.boolean, .token.tag,
.token.number, .token.boolean,
.token.constant, .token.number,
.token.symbol, .token.constant,
.token.deleted { .token.symbol,
color: #f81d22; .token.deleted {
} color: #f81d22;
}
.token.selector, .token.selector,
.token.attr-name, .token.attr-name,
.token.string, .token.string,
.token.char, .token.char,
.token.builtin, .token.builtin,
.token.inserted { .token.inserted {
color: #0b8235; color: #0b8235;
} }
.token.operator, .token.operator,
.token.entity, .token.entity,
.token.url, .token.url,
.language-css .token.string, .language-css .token.string,
.style .token.string { .style .token.string {
color: #0b8235; color: #0b8235;
} }
.token.atrule, .token.atrule,
.token.attr-value, .token.attr-value,
.token.keyword { .token.keyword {
color: #008dff; color: #008dff;
} }
.token.function { .token.function {
color: #f81d22; color: #f81d22;
} }
.token.regex, .token.regex,
.token.important, .token.important,
.token.variable { .token.variable {
color: #e90; color: #e90;
} }
.token.important, .token.important,
.token.bold { .token.bold {
font-weight: bold; font-weight: bold;
} }
.token.italic { .token.italic {
font-style: italic; font-style: italic;
} }
.token.entity { .token.entity {
cursor: help; cursor: help;
}
} }
`} `}
/> />