postcss-pxtransform 3.5.6 → 3.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -213,7 +213,9 @@ function createPxReplace (rootValue, unitPrecision, minPixelValue, onePxTransfor
|
|
|
213
213
|
const pixels = parseFloat($1)
|
|
214
214
|
if (pixels < minPixelValue) return m
|
|
215
215
|
const fixedVal = toFixed((pixels / rootValue(input, m, $1)), unitPrecision)
|
|
216
|
-
return (fixedVal === 0) ? '0' : fixedVal + targetUnit
|
|
216
|
+
// return (fixedVal === 0) ? '0' : fixedVal + targetUnit
|
|
217
|
+
// 不带单位不支持在calc表达式中参与计算
|
|
218
|
+
return fixedVal + targetUnit
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
221
|
}
|