提交 1d132ce4 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

refactor: Body mask always takes effect when enable

上级 68f48b25
......@@ -175,7 +175,7 @@ body:
repeat: false
# Mask effect of the background image.
mask:
enable: true
enable: false
# Opacity of mask (value: 0 ~ 1)
opacity:
# Opacity of the mask by default.
......
if (hexo-config('body.bg_image.enable')) {
body {
position: relative;
bodyBgSet() {
bodyBgSet() {
content: '';
display: block;
position: absolute;
......@@ -15,15 +11,11 @@ if (hexo-config('body.bg_image.enable')) {
position: fixed;
height: 100vh;
}
}
}
if (hexo-config('body.mask.enable')) {
&::before {
bodyBgSet();
z-index: $z-index-1;
background-color: alpha(#000, hexo-config('body.mask.opacity.default'));
}
}
if (hexo-config('body.bg_image.enable')) {
body {
position: relative;
&::after {
bodyBgSet();
......@@ -36,8 +28,19 @@ if (hexo-config('body.bg_image.enable')) {
}
}
}
}
body {
if (hexo-config('body.mask.enable')) {
&::before {
bodyBgSet();
z-index: $z-index-1;
background-color: alpha(#000, hexo-config('body.mask.opacity.default'));
}
}
}
if (hexo-config('body.mask.enable')) {
.nightmode {
body {
&::before {
......@@ -45,7 +48,6 @@ if (hexo-config('body.bg_image.enable')) {
}
}
}
}
}
.container {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册