diff --git a/lib/processCss.js b/lib/processCss.js index fb2ad703..2c2fea6d 100644 --- a/lib/processCss.js +++ b/lib/processCss.js @@ -41,7 +41,7 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) { } if(options.import) { - css.walkAtRules("import", function(rule) { + css.walkAtRules(/import/i, function(rule) { var values = Tokenizer.parseValues(rule.params); var url = values.nodes[0].nodes[0]; if(url.type === "url") { diff --git a/test/importTest.js b/test/importTest.js index 19efac8b..52c94510 100644 --- a/test/importTest.js +++ b/test/importTest.js @@ -9,6 +9,12 @@ describe("import", function() { ], "", { "./test.css": [[2, ".test{a: b}", ""]] }); + test("import camelcase", "@IMPORT url(test.css);\n.class { a: b c d; }", [ + [2, ".test{a: b}", ""], + [1, ".class { a: b c d; }", ""] + ], "", { + "./test.css": [[2, ".test{a: b}", ""]] + }); test("import with string", "@import \"test.css\";\n.class { a: b c d; }", [ [2, ".test{a: b}", ""], [1, ".class { a: b c d; }", ""]