fix: root background color

This commit is contained in:
GyDi 2022-10-11 20:49:03 +08:00
parent 41b19f69de
commit 15ff9b06a1
No known key found for this signature in database
GPG Key ID: 58B15242BA8277A6
2 changed files with 6 additions and 1 deletions

View File

@ -31,3 +31,9 @@ body {
@import "./layout.scss"; @import "./layout.scss";
@import "./page.scss"; @import "./page.scss";
@media (prefers-color-scheme: dark) {
:root {
background-color: rgba(18, 18, 18, 1);
}
}

View File

@ -67,7 +67,6 @@ export default function useCustomTheme() {
const scrollColor = mode === "light" ? "#90939980" : "#54545480"; const scrollColor = mode === "light" ? "#90939980" : "#54545480";
const rootEle = document.documentElement; const rootEle = document.documentElement;
rootEle.style.background = "transparent";
rootEle.style.setProperty("--selection-color", selectColor); rootEle.style.setProperty("--selection-color", selectColor);
rootEle.style.setProperty("--scroller-color", scrollColor); rootEle.style.setProperty("--scroller-color", scrollColor);
rootEle.style.setProperty("--primary-main", theme.palette.primary.main); rootEle.style.setProperty("--primary-main", theme.palette.primary.main);