Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: set data-theme attribute on body for third-party dark mode compat (#8231)

Ahmad Yasser3ba01043fe98
diff --git a/frontend/src/theme/ThemeProvider.tsx b/frontend/src/theme/ThemeProvider.tsx
index 64df0bd690..4bfa7d4ada 100644
--- a/frontend/src/theme/ThemeProvider.tsx
+++ b/frontend/src/theme/ThemeProvider.tsx
@@ -10,8 +10,10 @@ export const ThemeProvider: React.FC<PropsWithChildren> = memo(
const { theme } = useTheme();
useLayoutEffect(() => {
document.body.classList.add(theme, `${theme}-theme`);
+ document.body.dataset.theme = theme;
return () => {
document.body.classList.remove(theme, `${theme}-theme`);
+ delete document.body.dataset.theme;
};
}, [theme]);