From 0982e3cd456d8794971b55c7867e9b3cf7179d9b Mon Sep 17 00:00:00 2001 From: John Nesky Date: Fri, 13 Dec 2024 12:36:40 -0800 Subject: [PATCH] fix: Update screenshot plugin for compatibility with CSS vars. --- plugins/dev-tools/src/screenshot.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/dev-tools/src/screenshot.js b/plugins/dev-tools/src/screenshot.js index b10bf89741..6b233dd051 100644 --- a/plugins/dev-tools/src/screenshot.js +++ b/plugins/dev-tools/src/screenshot.js @@ -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'))