Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/icon pack/preview: fix Chromium's scrollbar color on dark theme
Adorian Doranf2ad790b36d9
diff --git a/apps/client/src/widgets/react/IsolatedFrame.tsx b/apps/client/src/widgets/react/IsolatedFrame.tsxindex c1705b87b3..4bff36e282 100644--- a/apps/client/src/widgets/react/IsolatedFrame.tsx+++ b/apps/client/src/widgets/react/IsolatedFrame.tsx@@ -50,7 +50,9 @@ export default function IsolatedFrame({ className, title, css, cssVars, bodyClasstyle.id = "isolated-frame-style";doc.head.appendChild(style);}- style.textContent = `${buildRootVars(cssVars)}${css ?? ""}`;+ // Forward the app's color scheme so the frame's UA-painted elements (scrollbars, form+ // controls) match the theme instead of defaulting to light.+ style.textContent = `:root { color-scheme: ${colorScheme}; }\n${buildRootVars(cssVars)}${css ?? ""}`;}, [ css, cssVars, colorScheme, body ]);useLayoutEffect(() => {