Skip to content
Snippets Groups Projects
Commit f331cea7 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Inline only a small number of properties

parent ad961f5d
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment