borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

Fix SVG encoding #18

Closed demiazz closed 9 years ago

demiazz commented 9 years ago

@borodean, hi! I'm fix generation inline SVG. I use library, which use postcss-url, and them generate safety not corrupted dataURI.

And I fix fixtures. But I found strange behaviour. PostCSS may generate or may not ' in url. @ai, can you comment this?

ai commented 9 years ago

Yeap. This should fix SVG issues.

ai commented 9 years ago

@borodean any updates? We will suggest your tool on our Brainwashing workshop and SVG escape bug is very important.

borodean commented 9 years ago

@ai, @demiazz, could you please provide a more broad explanation of what this issue is?

ai commented 9 years ago

@demiazz can you add that SVG, that broke your styles after inlining?

I saw that some images are broke CSS in postcss-assets. But postcss-url inlines them without any problems. So I think that we need just copy postcss-url SVG escape if we sure, that it works.

niksy commented 9 years ago

I’ve noticed the problem in Firefox, and after applying this fix everything works fine.

demiazz commented 9 years ago

https://gist.github.com/demiazz/7b11535b33a852622a42

For example, one of many files, which has been incorrect inlined with utf-8 encoding.

borodean commented 9 years ago

@demiazz could you please do a similar pull request, but against develop? This repo is following git-flow methodology so pushing features directly would bring some mess.

demiazz commented 9 years ago

@borodean ОK. And I will merge all commits in one in new PR.

borodean commented 9 years ago

@demiazz, sorry, I’ve just realized that your fix fits gitflow, because it’s of a hotfix kind.

Merged.