From 5163b240c2e10bdbd8b166308a7044d8edc12cce Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Mon, 23 Dec 2019 15:36:07 +0800 Subject: [PATCH] feat: code block dark theme --- site/theme/static/highlight.less | 67 ++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/site/theme/static/highlight.less b/site/theme/static/highlight.less index ebb94b50d6..1f1346938b 100644 --- a/site/theme/static/highlight.less +++ b/site/theme/static/highlight.less @@ -154,3 +154,70 @@ pre[class*='language-'] { .token.entity { cursor: help; } + +[data-theme='dark'] { + .token.comment, + .token.quote { + color: #b6b18b; + } + + .token.variable, + .token.template-variable, + .token.tag, + .token.number, + .token.name, + .token.selector-id, + .token.selector-class, + .token.regexp, + .token.deletion { + color: #eb3c54; + } + + .token.built_in, + .token.builtin-name, + .token.literal, + .token.type, + .token.params, + .token.meta, + .token.link { + color: #e7ce56; + } + + .token.attribute { + color: #ee7c2b; + } + + .token.string, + .token.symbol, + .token.bullet, + .token.addition { + color: #4fb4d7; + } + + .token.title, + .token.section { + color: #78bb65; + } + + .token.function, + .token.keyword, + .token.selector-tag { + color: #b45ea4; + } + + .hljs { + display: block; + overflow-x: auto; + background: #1c1d21; + color: #c0c5ce; + padding: 0.5em; + } + + .token.emphasis { + font-style: italic; + } + + .token.strong { + font-weight: bold; + } +}