From 6b31669765df64939e9d5b0883d645f0c24b211c Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Wed, 1 May 2024 22:54:53 -0700 Subject: [PATCH] Fix diagrams in Dark mode. Fixes #520 --- src/modules/blocks/code/RenderCode.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/blocks/code/RenderCode.tsx b/src/modules/blocks/code/RenderCode.tsx index 21fa4404b..54d2b6f93 100644 --- a/src/modules/blocks/code/RenderCode.tsx +++ b/src/modules/blocks/code/RenderCode.tsx @@ -182,6 +182,10 @@ function RenderCodeImpl(props: RenderCodeImplProps) { minWidth: 160, '&:hover > .overlay-buttons': { opacity: 1 }, ...(props.sx || {}), + // fix for SVG diagrams over dark mode: https://github.com/enricoros/big-AGI/issues/520 + '[data-joy-color-scheme="dark"] &': (renderPlantUML || renderMermaid) ? { + backgroundColor: 'neutral.300', + } : {}, }}> {/* Markdown Title (File/Type) */}