Comments (2)
You can add custom CSS for .dark-theme
to override that. I am using something like this in custom.styl
:
// Dark mode for pre
.dark-theme .post-content figure,
.dark-theme .post-content figure.highlight .code pre {
background-color: $dark-post-blockquote-background-color;
color: $dark-mode-pre-foreground-color;
}
// Dark mode for pre line number
.dark-theme .post-content figure.highlight .gutter pre {
background-color: $dark-post-blockquote-background-color;
color: $dark-mode-pre-line-number-foreground-color;
}
Then you can specify the foreground color and background color of your choice.
from hexo-theme-chic.
我的解决方法是在Chic/source/css/_highlight下修改部分颜色定义达到code block dark mode 效果,不过这样也会强制light mode也显示这种效果
// Highlight Color
$highlight-deletion = #fdd
$highlight-addition = #dfd
$highlight-background = #303030
$highlight-current-line = #efefef
$highlight-selection = #d6d6d6
$highlight-foreground = #c8c8c8
$highlight-comment = #718c00
$highlight-red = #c82829
$highlight-orange = #f5871f
$highlight-yellow = #eab700
$highlight-green = #718c00
$highlight-aqua = #3e999f
$highlight-blue = #4271ae
$highlight-purple = #8959a8
$highlight-gutter = #869194
from hexo-theme-chic.
Related Issues (20)
- 还更新吗 HOT 12
- 為甚麼iconfont無法顯示? HOT 2
- 如何只保留dark主题呢 HOT 10
- 大佬,你这个About页面咋添加啊 HOT 4
- 代码块样式问题 HOT 2
- [BUG]社交links会错误地被显示 HOT 6
- [BUG]文章缩进等错误 HOT 1
- [BUG与咨询]文章到第二面以后,icon图标不再显示 HOT 2
- 表格中添加代码块,如何添加行号? HOT 6
- 实现CV简历页面的基础——Hexo + Chic 实现同一行 左中右分别布局(left-center-right in the same line)教程,Typora,Obsidian等markdown编辑器亦可参考 HOT 1
- 页面展开的地方函数调用错误 HOT 1
- 页面Cannot GET / 及404 HOT 1
- category丢失问题 HOT 2
- moment.js 時間格式 HOT 3
- 图片链接与Typora软件的适配问题
- waline 评论暗色模式适配 HOT 2
- toc栏折叠后点击小标题闪烁 HOT 1
- 控制台的一个报错
- 按照文档中的方法设置全局默认黑色主题后,在页面间切换时会有白屏一闪而过
- 图片放大 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo-theme-chic.