Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配色又变了吗,,, 能否支持dark mode #283

Closed
Litreily opened this issue Apr 22, 2020 · 8 comments
Closed

配色又变了吗,,, 能否支持dark mode #283

Litreily opened this issue Apr 22, 2020 · 8 comments

Comments

@Litreily
Copy link

@Litreily Litreily commented Apr 22, 2020

我的博客使用的是本人写的黑色系主题,配上新的valine样式显得很奇怪,之前更新了valine后是自己修改css匹配的,但是最近貌似又更新了其它样式,虽然可以自己修改解决,但是每次这么整也好麻烦啊
所以可否支持两种样式,dark mode, 和light mode, 给个选项进行配置?

@so1ve
Copy link

@so1ve so1ve commented Apr 22, 2020

这个已经增加了,适用于浏览器黑色模式 😏

@xCss
Copy link
Owner

@xCss xCss commented Apr 22, 2020

@Litreily 你的页面中的body加个night样式试试:

<body class="night">
    <!--your other code-->
</body>

虽然Valine是自动适配日间夜间模式,但仍需要网页告诉Valine该网站已启用了夜间模式(浏览器或者系统夜间模式会自动匹配),目前支持三种方式(三选一):

    1. body 添加data-theme="dark" 属性
<body data-theme="dark"></body>
    1. body 添加class="theme__dark" 样式
<body class="theme__dark"></body>
    1. body 添加class="night" 样式
<body class="night"></body>

@Litreily
Copy link
Author

@Litreily Litreily commented Apr 22, 2020

@xCss 感谢,可用,但是和主题还是不是很搭,又稍加修改了下,哈哈

@Litreily
Copy link
Author

@Litreily Litreily commented Apr 22, 2020

发现个小问题,night 模式下,浏览器类型部分的vhead vsys的字体颜色和评论区正文一样,能否将正文部分的调亮一些呢,谢谢
预览地址:https://www.litreily.top/about/

@Litreily Litreily reopened this Apr 22, 2020
@xCss
Copy link
Owner

@xCss xCss commented Apr 22, 2020

@Litreily 抱歉,这个就需要博主自己去调了,毕竟Valine不能针对每个颜色都适配一遍

@Litreily
Copy link
Author

@Litreily Litreily commented Apr 23, 2020

@Litreily 抱歉,这个就需要博主自己去调了,毕竟Valine不能针对每个颜色都适配一遍

这个我知道,但是我看light模式下,这两处的颜色是不一样的,可以形成对比,dark mode使用的却是一样的。 thanks any way.

@xCss
Copy link
Owner

@xCss xCss commented Apr 23, 2020

@Litreily OK,了解了

@xCss
Copy link
Owner

@xCss xCss commented Apr 23, 2020

@Litreily 新版已稍作修改。感谢反馈

@xCss xCss closed this as completed Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants