ubirak / gulp-uglifycss

Gulp plugin to use uglifycss
https://www.npmjs.org/package/gulp-uglifycss
MIT License
22 stars 5 forks source link

Spaces removed in url #8

Closed wgstjf closed 8 years ago

wgstjf commented 8 years ago

Hi there,

Just changed a site we are working on from dev to live, minified versions of the js and css and have noticed we have a problem with urls having all spaces removed, fine except for we are using the following to create a styled dropdown arrow in a select box.

url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="32" height="24" viewBox="0 0 32 24"><polygon points="0,0 32,0 16,24" style="fill: rgb%2851, 51, 51%29"></polygon></svg>')

after uglifycss gets through with it we get this

url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg "version="1.1"width="32"height="24"viewBox="003224"><polygonpoints="0,032,016,24"style="fill:rgb%2851,51,51%29"></polygon></svg>')

This results in the svg not being displayed. The issue seems to be the same one as reported here: https://github.com/fmarcia/UglifyCSS/issues/38

We are loading the dependency as follows:

"gulp-uglifycss": "^1.0.5"

Any thoughts on how we can fix this issue?

Cheers,

Will

wgstjf commented 8 years ago

I have managed a temporary fix by overwriting the contents of the node_modules/uglifycss folder with the latest version of uglifycss (0.0.2). Any chance you can update gulp-uglifycss to use this version rather than 0.0.18?

Cheers,

Will

armandabric commented 8 years ago

Ho I use ^ as dependencies constraint... This should fix it https://github.com/rezzza/gulp-uglifycss/pull/9

wgstjf commented 8 years ago

Thanks and you're right it does.

Unfortunately, being as gulp-uglifycss itself is loaded as a dependency this will mean that we will now have to 'install' our project, then edit the package file for gulp-uglifycss, then 'update' each time we begin a project. Not a major issue just one more thing that needs doing :-)

Thanks for the quick reply.

Will

armandabric commented 8 years ago

Version 1.0.6 published on NPM. Please upgrade.

wgstjf commented 8 years ago

Too kind! Thanks :-)