keithclark / selectivizr

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.
1.71k stars 247 forks source link

@import rules with minified CSS that contains other 'url' rules will fail to parse @import's url #69

Open jesstelford opened 11 years ago

jesstelford commented 11 years ago

Examples include:

@import url("min-import-url-quoted-double.css");.minified{background:url("css/nested/test.png");}

/* Which will incorrectly match the URL of the css file as: */
min-import-url-quoted-double.css");.minified{background:url("css/nested/test.png
@import "min-import-quoted-double.css";.minified{background:url("css/nested/test.png");}

/* Which will incorrectly match the URL of the css file as: */
min-import-quoted-double.css";.minified{background:url("css/nested/test.png

This fix updates the @import regex to fix this issue.

Note: See the tests/master/index.html for the unit tests, which have only been tested in IE8!

corysimmons commented 8 years ago

@keithclark disappeared so I'm going to try and maintain this project at https://github.com/corysimmons/selectivizr2

Would you please reopen/rebase your PR over there?