Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect base64-encoded SVG data placing #4

Open
lexkrstn opened this issue Sep 19, 2016 · 0 comments
Open

Incorrect base64-encoded SVG data placing #4

lexkrstn opened this issue Sep 19, 2016 · 0 comments

Comments

@lexkrstn
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant