From f7ad322d4c60081a2093d8a23fcf5a99105a7f97 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 30 Dec 2025 19:01:08 -0800 Subject: [PATCH] Revert "Fix: restore bg image to body again (#5828)" This reverts commit 06cf76d724b8d2f145b14f05a59aac3bf453052b. --- src/pages/index.jsx | 68 ++++++++++++++++++------------------------ src/styles/globals.css | 12 ++++++++ 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 9109b4bd3..c243c3ff4 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -554,48 +554,38 @@ export default function Wrapper({ initialSettings, fallback }) { html.classList.add(desiredThemeClass); } - if (backgroundImage) { - const safeBackgroundImage = backgroundImage.replace(/'/g, "\\'"); - body.style.backgroundImage = `linear-gradient(rgb(var(--bg-color) / ${opacity}), rgb(var(--bg-color) / ${opacity})), url('${safeBackgroundImage}')`; - body.style.backgroundSize = "cover"; - body.style.backgroundPosition = "center"; - body.style.backgroundAttachment = "fixed"; - body.style.backgroundRepeat = "no-repeat"; - body.style.backgroundColor = ""; - } else { - body.style.backgroundImage = "none"; - body.style.backgroundColor = "rgb(var(--bg-color))"; - body.style.backgroundSize = ""; - body.style.backgroundPosition = ""; - body.style.backgroundAttachment = ""; - body.style.backgroundRepeat = ""; - } - - return () => { - body.style.backgroundImage = ""; - body.style.backgroundColor = ""; - body.style.backgroundSize = ""; - body.style.backgroundPosition = ""; - body.style.backgroundAttachment = ""; - body.style.backgroundRepeat = ""; - }; + // Remove any previously applied inline styles + body.style.backgroundImage = ""; + body.style.backgroundColor = ""; + body.style.backgroundAttachment = ""; }, [backgroundImage, opacity, theme, color, initialSettings.color]); return ( -