Skip to content

Commit bb19171

Browse files
committed
not doing media queries like this any more
1 parent e942309 commit bb19171

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

src/index.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,9 @@ const processor = postcss.plugin('postcss-modules-scope', function(options) {
133133
// Find any :local keyframes
134134
css.walkAtRules(atrule => {
135135
if(/keyframes$/.test(atrule.name)) {
136-
var localKeyFrames = /^\s*:local\s*\((.+?)\)\s*$/.exec(atrule.params);
137-
if(localKeyFrames) {
138-
atrule.params = exportScopedName(localKeyFrames[1]);
139-
}
140-
// Find any local() custom media, export them, but leave them as they are
141-
} else if (atrule.name === "custom-media") {
142-
var customMedia = /^\s*(--\S+)\s*(.*)$/.exec(atrule.params);
143-
if(customMedia) {
144-
let [/*match*/, breakpointName, mediaExpr] = customMedia;
145-
exports[breakpointName] = [`"${ mediaExpr}"`];
146-
atrule.params = `${breakpointName} ${mediaExpr}`;
136+
var localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atrule.params);
137+
if(localMatch) {
138+
atrule.params = exportScopedName(localMatch[1]);
147139
}
148140
}
149141
});

test/test-cases/export-custom-media/expected.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/test-cases/export-custom-media/source.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)