Skip to content

Commit

Permalink
fix: case insensitivity of @import (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored and michael-ciniawsky committed Apr 23, 2017
1 parent 67cae9a commit de4356b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/processCss.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
6 changes: 6 additions & 0 deletions test/importTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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; }", ""]
Expand Down

0 comments on commit de4356b

Please sign in to comment.