mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 14:03:44 +08:00
feat: Theme support modify --background-color
This commit is contained in:
parent
b060b4b9bf
commit
70fcfe6d6c
@ -16,6 +16,7 @@ body {
|
|||||||
--text-primary: #637381;
|
--text-primary: #637381;
|
||||||
--selection-color: #f5f5f5;
|
--selection-color: #f5f5f5;
|
||||||
--scroller-color: #90939980;
|
--scroller-color: #90939980;
|
||||||
|
--background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
::selection {
|
::selection {
|
||||||
|
@ -84,10 +84,12 @@ export const useCustomTheme = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// css
|
// css
|
||||||
|
const backgroundColor = mode === "light" ? "#ffffff" : "#121212";
|
||||||
const selectColor = mode === "light" ? "#f5f5f5" : "#d5d5d5";
|
const selectColor = mode === "light" ? "#f5f5f5" : "#d5d5d5";
|
||||||
const scrollColor = mode === "light" ? "#90939980" : "#54545480";
|
const scrollColor = mode === "light" ? "#90939980" : "#54545480";
|
||||||
|
|
||||||
const rootEle = document.documentElement;
|
const rootEle = document.documentElement;
|
||||||
|
rootEle.style.setProperty("--background-color", backgroundColor);
|
||||||
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user