Skip to content

Commit eecfccd

Browse files
authored
fix: Update screenshot plugin for compatibility with CSS vars. (#2472)
1 parent 2d4d03f commit eecfccd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/dev-tools/src/screenshot.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ function workspaceToSvg_(workspace, callback, customCss) {
8484
);
8585
svg.setAttribute('width', width);
8686
svg.setAttribute('height', height);
87-
svg.setAttribute('style', 'background-color: transparent');
87+
svg.setAttribute(
88+
'style',
89+
'background-color: transparent; ' +
90+
workspace.getInjectionDiv().style.cssText, // has CSS vars for SVG filters
91+
);
8892

8993
const css = [].slice
9094
.call(document.head.querySelectorAll('style'))

0 commit comments

Comments
 (0)