From ca83c80da0dec32ebc906eaec944d22831d7081b Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Sun, 16 Apr 2023 19:24:02 +0800 Subject: [PATCH] optimize main style, looking for ways to invert background image in dark mode --- source/_data/styles.styl | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/source/_data/styles.styl b/source/_data/styles.styl index fcfdc7c..2437272 100644 --- a/source/_data/styles.styl +++ b/source/_data/styles.styl @@ -1,22 +1,14 @@ // Custom styles. -// 设置背景图片 body{ - // background:url('https://josh-blog-1257563604.cos.ap-beijing.myqcloud.com/img/backgroud.jpg'); - background:url(../images/bg.svg); - background-repeat:repeat; - // background-attachment:fixed; - // background-position:center; - // background-size:100% 100%; -} - -// 博客内容透明化 -// :root { -// --content-bg-color:rgba(255, 255, 255, 0.96); -// } + // 设置背景图片 + background:url(../images/bg.svg); + background-repeat:repeat; + } @media (prefers-color-scheme: light) { :root { + // 博客内容透明化 --content-bg-color:rgba(255, 255, 255, 0.96); } } @@ -25,6 +17,9 @@ body{ :root { --content-bg-color:rgba(0, 0, 0, 0.88); } + // img{ + // filter: invert(1); + // } } // 修复不蒜子显示属性被 hexo-helper-live2d 覆盖