improved static styles and x-browser scrollbars

This commit is contained in:
Ben Phelps
2022-09-30 22:13:37 +03:00
parent 2271cc0044
commit f52c6f3b41
5 changed files with 61 additions and 27 deletions

View File

@@ -22,7 +22,7 @@ export function ThemeProvider({ initialTheme, children }) {
const [theme, setTheme] = useState(getInitialTheme);
const rawSetTheme = (rawTheme) => {
const root = window.document.documentElement;
const root = window.document.getElementById("page_wrapper");
const isDark = rawTheme === "dark";
root.classList.remove(isDark ? "light" : "dark");