Inline only a small number of properties

This commit is contained in:
Paul Kaplan committed 2018-11-01 15:01:52 -04:00
1 parent ad961f5d04
commit f331cea769
1 file changed
+6 -1
+6 -1
View File
@@ -37,7 +37,12 @@ export default function (blockId) {
// not all the styles are set directly on the SVG. This makes the
// image styled the same way the block actually appears.
// TODO this doesn't handle images that are xlink:href in the SVG
computedStyleToInlineStyle(svg, {recursive: true});
computedStyleToInlineStyle(svg, {
recursive: true,
// Enumerate the specific properties we need to inline.
// Specifically properties that are set from CSS in scratch-blocks
properties: ['fill', 'font-family', 'font-size', 'font-weight']
});
const svgString = (new XMLSerializer()).serializeToString(svg);