From b13b2da91edc141fcb9bfd07f82a92fbc7ecc893 Mon Sep 17 00:00:00 2001 From: Nikolay Makhonin Date: Sun, 2 Oct 2022 11:42:43 +0400 Subject: [PATCH] fix: Transform within default variables https://github.com/cuth/postcss-pxtorem/issues/79 --- lib/pixel-unit-regex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pixel-unit-regex.js b/lib/pixel-unit-regex.js index 7115052..87d656e 100644 --- a/lib/pixel-unit-regex.js +++ b/lib/pixel-unit-regex.js @@ -6,4 +6,4 @@ // Any digit followed by px // !singlequotes|!doublequotes|!url()|pixelunit -module.exports = /"[^"]+"|'[^']+'|url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g; +module.exports = /"[^"]+"|'[^']+'|url\([^)]+\)|((?<=^|[^\w-])-?\d*\.?\d+)px\b/g;