Skip to content

Commit 0a108a3

Browse files
committed
fixed media query bug
1 parent 63fcd33 commit 0a108a3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function(content) {
2222

2323
imports.forEach(function(imp) {
2424
if(imp.media.length > 0) {
25-
result.push(JSON.stringify("@media(" + imp.media.join("") + "){"));
25+
result.push(JSON.stringify("@media " + imp.media.join("") + "{"));
2626
}
2727
result.push("require(" + JSON.stringify(__filename + "!" + urlToRequire(imp.url)) + ")");
2828
if(imp.media.length > 0) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "css-loader",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"author": "Tobias Koppers @sokra",
55
"description": "css loader module for webpack",
66
"dependencies": {

test/url_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ vows.describe("url").addBatch({
3131
"\"\\n.class { a: b c d; }\""]),
3232
"import with media":
3333
test("@import url(~test/css) screen and print;\n.class { a: b c d; }",
34-
["\"@media(screen and print){\"",
34+
["\"@media screen and print{\"",
3535
"require("+JSON.stringify(path.join(__dirname, "..", "index.js")+"!test/css")+")",
3636
"\"}\"",
3737
"\"\\n.class { a: b c d; }\""]),

0 commit comments

Comments
 (0)