Skip to content

Commit

Permalink
fix: Update screenshot plugin for compatibility with CSS vars. (#2472)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnesky authored Dec 14, 2024
1 parent 2d4d03f commit eecfccd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/dev-tools/src/screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ function workspaceToSvg_(workspace, callback, customCss) {
);
svg.setAttribute('width', width);
svg.setAttribute('height', height);
svg.setAttribute('style', 'background-color: transparent');
svg.setAttribute(
'style',
'background-color: transparent; ' +
workspace.getInjectionDiv().style.cssText, // has CSS vars for SVG filters
);

const css = [].slice
.call(document.head.querySelectorAll('style'))
Expand Down

0 comments on commit eecfccd

Please sign in to comment.