Skip to content

Commit f1992b9

Browse files
committed
no longer look for local()
1 parent d54d49b commit f1992b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const processor = postcss.plugin('postcss-modules-scope', function(options) {
139139
}
140140
// Find any local() custom media, export them, but leave them as they are
141141
} else if (atrule.name === "custom-media") {
142-
var customMedia = /^\s*local\(([^\)]+)\)\s*(.*)$/.exec(atrule.params);
142+
var customMedia = /^\s*(--\S+)\s*(.*)$/.exec(atrule.params);
143143
if(customMedia) {
144144
let [/*match*/, breakpointName, mediaExpr] = customMedia;
145145
exports[breakpointName] = [`"${ mediaExpr}"`];
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@custom-media local(--small) (max-width: 30rem);
1+
@custom-media --small (max-width: 30rem);

0 commit comments

Comments
 (0)