Skip to content

Commit

Permalink
Fix diagrams in Dark mode. Fixes #520
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed May 2, 2024
1 parent 26d72fc commit 6b31669
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/blocks/code/RenderCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) */}
Expand Down

0 comments on commit 6b31669

Please sign in to comment.