️: 优化 prism 高亮样式

This commit is contained in:
就眠儀式 2022-05-12 04:54:02 +08:00
parent 381de61963
commit 28fe83c02d
3 changed files with 13 additions and 12 deletions

View File

@ -1,9 +1,10 @@
code { code {
margin: 0; margin: 0;
border-radius: 3px;
padding: 0.25rem 0.5rem; padding: 0.25rem 0.5rem;
font-size: 0.85em; border-radius: 3px;
background-color: rgba(27, 31, 35, 0.05); background-color: rgba(27, 31, 35, 0.05);
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
font-size: 0.85em;
} }
code .token.deleted { code .token.deleted {
@ -72,10 +73,11 @@ li > div[class*='language-'] {
[class*='language-'] code { [class*='language-'] code {
padding: 0; padding: 0;
line-height: 24px; color: #303133;
font-size: 14px;
color: #000;
background-color: #fafafa; background-color: #fafafa;
letter-spacing: 0.5px;
line-height: 23px;
font-size: 14px;
} }
/** /**
@ -110,14 +112,14 @@ li > div[class*='language-'] {
.token.boolean, .token.boolean,
.token.number, .token.number,
.token.function { .token.function {
color: #f08d49; color: #f5871f;
} }
.token.property, .token.property,
.token.class-name, .token.class-name,
.token.constant, .token.constant,
.token.symbol { .token.symbol {
color: #f8c555; color: #f5871f;
} }
.token.selector, .token.selector,

View File

@ -31,14 +31,13 @@ export const usePlayGround = async (
code = decodeCode.replace( code = decodeCode.replace(
scriptRe, scriptRe,
`<script lang="ts" setup>$1 `<script lang="ts" setup>$1
</script>` </script>`
); );
} else { } else {
code = `${decodeCode} code = `${decodeCode}
<script lang="ts" setup> <script lang="ts" setup>
</script> </script>`
`;
} }
// 去除 export default,保留其中的内容 // 去除 export default,保留其中的内容