jbleuzen / node-cssmin

A little node module that minimize CSS Files
111 stars 31 forks source link

Space incorrectly removed when using svg gaussian blur filter #11

Open ltressens opened 11 years ago

ltressens commented 11 years ago

This expression (css blur for Firefox) :

.blur
{
  filter: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter id="gaussian_blur"><feGaussianBlur in="SourceGraphic" stdDeviation="4" /></filter></defs></svg>#gaussian_blur');
}

Is minified like this :

.blur{filter:url("data:image/svg+xml;utf8,<svgversion=\"1.1\"xmlns=\"http://www.w3.org/2000/svg\"xmlns:xlink=\"http://www.w3.org/1999/xlink\"><defs><filterid=\"gaussian_blur\"><feGaussianBlurin=\"SourceGraphic\"stdDeviation=\"4\"/></filter></defs></svg>#gaussian_blur")}

Spaces are removed where they should not : "svg version", "filter id", etc...

akaihola commented 11 years ago

See also: http://stackoverflow.com/questions/13949588/yui-compressor-is-removing-spaces-from-filter-values https://yuilibrary.com/projects/yuicompressor/ticket/2528170

akaihola commented 11 years ago

Work-around: Replace spaces with %20. Firefox happy, minifier doesn't touch. Don't know about other browsers.

marcelstoer commented 9 years ago

I believe that is inherited from YUI Compressor: https://github.com/yui/yuicompressor/issues/141.