Closed necolas closed 10 years ago
Move from: https://github.com/reworkcss/rework/issues/154
According to CSS 2.1 specification, URI value can contain space after url( or before ). url plugin processes incorrectly such values. Consider the following code:
url(
)
var rework = require("rework"); var css = rework("body { \n background-image: url( 'path/to/some/image.png' );\n }") .use(rework.url(function(url){ return url; })) .toString(); console.log(css);
Wrong CSS code will be printed:
body { background-image: url(" 'path/to/some/image.png' "); }
The following URLs are also processed incorrectly:
url( "path/to/some/image.png" )
url( path/to/some/image.png )
url( 'path/to/some/image.png')
url('path/to/some/image.png' )
and so on.
Move from: https://github.com/reworkcss/rework/issues/154
According to CSS 2.1 specification, URI value can contain space after
url(
or before)
. url plugin processes incorrectly such values. Consider the following code:Wrong CSS code will be printed:
The following URLs are also processed incorrectly:
url( "path/to/some/image.png" )
url( path/to/some/image.png )
url( 'path/to/some/image.png')
url('path/to/some/image.png' )
and so on.