Question

I'm using recess to compile and compress my LESS files, but i'm having some troubles with a specific Firefox css to convert an Img to grayscale, here is a snippet of the LESS code

.colorgray {
        filter : url("data:svg+xml;utf8,<svg  id='sometest'>mores-tuff-here</svg>");
}

I run recess --compress test.less > test.min.css and the output of cat test.min.css is

.colorgray{filter:url("data:svg+xml;utf8,<svgid='sometest'>mores-tuff-here</svg>")}

And you may notice, svg id="sometest" is rendered as svgid="sometest", if i only try with the --compile flag, i get the result that i expect:

.colorgray {
  filter: url("data:svg+xml;utf8,<svg  id='sometest'>mores-tuff-here</svg>");
}

Anyone know what i am doing wrong or if there is a way to tell the recess minifier to ignore that line?

edit: seems to be a problem with yui-compressor, it strips every whitespace on a data, is there a way to turn that option off?

Was it helpful?

Solution

I had to create a new file (filters.svg) and put the content there (mores-tuff-here)

and ended using:

.colorgray {
        filter : url(filter.svg);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top