mirror of
https://github.com/mermaid-js/mermaid-live-editor.git
synced 2026-11-04 08:59:08 +00:00
Merge pull request #1788 from PetrLaskevic/develop
fix: light background with dark diagram theme when downloading SVG ([#1777](https://github.com/mermaid-js/mermaid-live-editor/issues/1777))
This commit is contained in:
1 file changed
+2
@@ -50,6 +50,8 @@
|
||||
svg = getSvgElement();
|
||||
}
|
||||
|
||||
svg.style.backgroundColor = `hsl(${window.getComputedStyle(document.body).getPropertyValue('--background')})`;
|
||||
|
||||
const svgString = svg.outerHTML
|
||||
.replaceAll('<br>', '<br/>')
|
||||
.replaceAll(/<img([^>]*)>/g, (m, g: string) => `<img ${g} />`);
|
||||
|
||||
Reference in new issue
Block a user