Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: case insensitivity of @import #514

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/processCss.js
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
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