diff --git a/src/replaceSymbols.js b/src/replaceSymbols.js index c12ecc1..21418b6 100644 --- a/src/replaceSymbols.js +++ b/src/replaceSymbols.js @@ -9,11 +9,7 @@ const replaceSymbols = (css, replacements) => { node.selector.toString(), replacements ); - } else if ( - node.type === "atrule" && - node.params && - ["media", "supports"].includes(node.name.toLowerCase()) - ) { + } else if (node.type === "atrule" && node.params) { node.params = replaceValueSymbols(node.params.toString(), replacements); } }); diff --git a/test/replaceSymbols.test.js b/test/replaceSymbols.test.js index bf6e189..747e7df 100644 --- a/test/replaceSymbols.test.js +++ b/test/replaceSymbols.test.js @@ -17,8 +17,10 @@ test("not change property names", () => { ); }); -test("not change non-media at-rules", () => { - expect(replace("@import url;", { url: "otherUrl" })).toEqual("@import url;"); +test("change non-media at-rules", () => { + expect(replace("@import url;", { url: "otherUrl" })).toEqual( + "@import otherUrl;" + ); }); test("change declaration values", () => {