systemjs / plugin-css

CSS loader plugin
MIT License
92 stars 60 forks source link

Bundling of embedded svg corrupts url references #131

Closed kwesterfeld closed 7 years ago

kwesterfeld commented 7 years ago

We are using an inliner to bundle svg into data-uri based css. When this css is then built using plugin-css, the construct such as this:

fill="url(#a)" clip-path="url(#b)"

are incorrectly modified to something like this:

fill="url(app/path/a") etc.

This is because the url handling in plugin-css is prepending the base url/app path in this case. Since these url references are referring to the section of SVG, it would make sense to detect this and avoid making this adjustment.

Pull request on the way to detect url(#, which should be referring to an id vs. absolute path.

guybedford commented 7 years ago

Thanks, merged and released in 0.1.34.