Fixhancement: restore native scrolling, background (#5573)
Some checks failed
Crowdin Action / Crowdin Sync (push) Has been cancelled
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Repository Maintenance / Stale (push) Has been cancelled
Repository Maintenance / Lock Old Threads (push) Has been cancelled
Repository Maintenance / Close Answered Discussions (push) Has been cancelled
Repository Maintenance / Close Outdated Discussions (push) Has been cancelled
Repository Maintenance / Close Unsupported Feature Requests (push) Has been cancelled

This commit is contained in:
shamoon
2025-07-25 18:01:03 -07:00
committed by GitHub
parent 0c000c1ecd
commit 8c4e73e122
4 changed files with 63 additions and 60 deletions

View File

@@ -20,7 +20,7 @@ export function ColorProvider({ initialTheme, children }) {
const [color, setColor] = useState(getInitialColor);
const rawSetColor = (rawColor) => {
const root = window.document.getElementById("page_wrapper");
const root = window.document.documentElement;
root.classList.remove(`theme-${lastColor}`);
root.classList.add(`theme-${rawColor}`);

View File

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