@thedutchcoder/postcss-rem-to-px
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -11,4 +11,6 @@ /** | ||
const unit = 'px' | ||
decl.value = decl.value.replace(/"[^"]+"|'[^']+'|url\([^)]+\)|(-?\d*\.?\d+)rem/g, (_a, b) => { | ||
return `${b * opts.baseValue}${b == 0 ? '' : unit}` | ||
decl.value = decl.value.replace(/"[^"]+"|'[^']+'|url\([^)]+\)|(-?\d*\.?\d+)rem/g, (match, p1) => { | ||
if (p1 === undefined) return match | ||
return `${p1 * opts.baseValue}${p1 == 0 ? '' : unit}` | ||
}) | ||
@@ -15,0 +17,0 @@ } |
{ | ||
"name": "@thedutchcoder/postcss-rem-to-px", | ||
"version": "0.0.0", | ||
"description": "PostCSS plugin test", | ||
"version": "0.0.1", | ||
"description": "PostCSS plugin to convert rem values to px values", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "postcss", |
3203
17