From 1e93f4318ada9a650ca04908684399d8409deaac Mon Sep 17 00:00:00 2001 From: Oleg Isonen Date: Mon, 11 Jul 2022 19:00:43 +0200 Subject: [PATCH] allow other potential classes on the root to stay --- apps/designer/app/shared/theme/theme.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/designer/app/shared/theme/theme.ts b/apps/designer/app/shared/theme/theme.ts index 444ce09210..23ea40f215 100644 --- a/apps/designer/app/shared/theme/theme.ts +++ b/apps/designer/app/shared/theme/theme.ts @@ -47,8 +47,8 @@ const renderThemeProps = () => { const theme = getColorScheme(); const root = document.documentElement; theme === "dark" - ? (root.className = darkTheme.className) - : root.removeAttribute("class"); + ? root.classList.add(darkTheme.className) + : root.classList.remove(darkTheme.className); root.style.colorScheme = theme; root.dataset.theme = theme; };