postcss-pxtransform 3.5.6 → 3.5.7-alpha.1

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.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-pxtransform",
3
- "version": "3.5.6",
3
+ "version": "3.5.7-alpha.1",
4
4
  "description": "PostCSS plugin px 转小程序 rpx及h5 rem 单位",
5
5
  "keywords": [
6
6
  "postcss",