I'm using the following Mustache template to produce SASS partial:
$base64-svg-map: ({{#items}}
{{name}}: "{{{data}}}",
{{/items}});
@mixin base64-svg($name) {
background-image: #{map-get($base64-svg-map, $name)}, linear-gradient(transparent, transparent);
}
It generates:
$base64-svg-map: (
search-line-options-btn-hi: "url(data:image/svg+xml; ...blah, blah, blah
But my SVG file's data cannot be parsed correctly in this way because it contains parentheses itself.
To solve the issue the data should be enclosed in quatation marks.
Notice that the SASS code above would fail to compile after the change.
I'm using the following Mustache template to produce SASS partial:
It generates:
But my SVG file's data cannot be parsed correctly in this way because it contains parentheses itself.
To solve the issue the data should be enclosed in quatation marks.
Notice that the SASS code above would fail to compile after the change.