diff --git a/packages/vant-cli/site/common/style/highlight.less b/packages/vant-cli/site/common/style/highlight.less index 88591ddec..6552ad4eb 100644 --- a/packages/vant-cli/site/common/style/highlight.less +++ b/packages/vant-cli/site/common/style/highlight.less @@ -7,11 +7,12 @@ code { overflow-x: auto; color: @van-doc-code-color; font-weight: 400; - font-size: 13px; + font-size: 13.4px; font-family: @van-doc-code-font-family; line-height: 26px; white-space: pre-wrap; word-wrap: break-word; + -webkit-font-smoothing: auto; } pre { @@ -35,7 +36,7 @@ pre { .hljs-template-tag, .hljs-template-variable, .hljs-addition { - color: @van-doc-purple; + color: @van-doc-green; } .hljs-comment, @@ -43,21 +44,23 @@ pre { color: #999; } +.hljs-params, +.hljs-keyword, +.hljs-attribute { + color: @van-doc-purple; +} + +.hljs-deletion, +.hljs-variable, .hljs-number, .hljs-regexp, .hljs-literal, .hljs-bullet, .hljs-link { - color: #07c160; -} - -.hljs-deletion, -.hljs-variable { - color: #88f; + color: #eb6f6f; } .hljs-attr, -.hljs-keyword, .hljs-selector-tag, .hljs-title, .hljs-section, @@ -68,13 +71,9 @@ pre { .hljs-selector-id, .hljs-selector-class, .hljs-strong { - color: @van-doc-blue; + color: #5299e0; } .hljs-emphasis { font-style: italic; } - -.hljs-attribute { - color: #e6550d; -} diff --git a/packages/vant-cli/site/common/style/var.less b/packages/vant-cli/site/common/style/var.less index bc75b3632..b15f2a879 100644 --- a/packages/vant-cli/site/common/style/var.less +++ b/packages/vant-cli/site/common/style/var.less @@ -1,7 +1,8 @@ @van-doc-black: #323233; @van-doc-blue: #1989fa; -@van-doc-purple: #5758bb; +@van-doc-purple: #8080ff; @van-doc-fuchsia: #a7419e; +@van-doc-green: #4fc08d; @van-doc-text-color: #34495e; @van-doc-text-light-blue: rgba(69, 90, 100, .6); @van-doc-background-color: #f7f8fa; diff --git a/packages/vant-cli/site/desktop/components/Content.vue b/packages/vant-cli/site/desktop/components/Content.vue index 6e129d8bb..cfdc30c7d 100644 --- a/packages/vant-cli/site/desktop/components/Content.vue +++ b/packages/vant-cli/site/desktop/components/Content.vue @@ -38,6 +38,7 @@ export default { a { color: @van-doc-blue; + -webkit-font-smoothing: auto; } h1, @@ -67,9 +68,9 @@ export default { } h3 { - margin-bottom: 12px; + margin-bottom: 16px; font-weight: 500; - font-size: 17px; + font-size: 18px; } h4 { @@ -119,6 +120,7 @@ export default { &:first-child { padding-left: 0; + // version tag code { margin: 0; padding: 2px 6px; @@ -135,18 +137,12 @@ export default { } } - code { - padding: 0 8px; - font-size: 13px; - font-family: inherit; - word-break: keep-all; - } - em { - color: @van-doc-fuchsia; - font-size: 12px; + color: @van-doc-green; + font-size: 12.5px; font-family: @van-doc-code-font-family; font-style: normal; + -webkit-font-smoothing: auto; } } @@ -185,8 +181,12 @@ export default { display: inline; margin: 2px 3px; padding: 2px 5px; + font-size: 13px; + font-family: inherit; + word-break: keep-all; background-color: #f0f2f5; border-radius: 4px; + -webkit-font-smoothing: antialiased; } section {