postcss-convert-values 7.0.3 → 7.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-convert-values",
3
- "version": "7.0.3",
3
+ "version": "7.0.5",
4
4
  "description": "Convert values with PostCSS (e.g. ms -> s)",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "repository": "cssnano/cssnano",
26
26
  "dependencies": {
27
- "browserslist": "^4.23.3",
27
+ "browserslist": "^4.24.5",
28
28
  "postcss-value-parser": "^4.2.0"
29
29
  },
30
30
  "bugs": {
@@ -34,9 +34,9 @@
34
34
  "node": "^18.12.0 || ^20.9.0 || >=22.0"
35
35
  },
36
36
  "devDependencies": {
37
- "postcss": "^8.4.40"
37
+ "postcss": "^8.5.3"
38
38
  },
39
39
  "peerDependencies": {
40
- "postcss": "^8.4.31"
40
+ "postcss": "^8.4.32"
41
41
  }
42
42
  }
package/src/index.js CHANGED
@@ -90,6 +90,9 @@ function parseWord(node, opts, keepZeroUnit) {
90
90
  (keepZeroUnit || (!LENGTH_UNITS.has(u.toLowerCase()) && u !== '%')
91
91
  ? u
92
92
  : '');
93
+ if (node.value === '0ms') {
94
+ node.value = '0s';
95
+ }
93
96
  } else {
94
97
  node.value = convert(num, u, opts);
95
98
 
@@ -154,7 +157,7 @@ function shouldKeepZeroUnit(decl, browsers) {
154
157
  (node) =>
155
158
  node.type === 'decl' &&
156
159
  node.prop.toLowerCase() === 'syntax' &&
157
- node.value === "'<percentage>'"
160
+ (node.value === "'<percentage>'" || node.value === '"<percentage>"')
158
161
  )) ||
159
162
  keepWhenZero.has(lowerCasedProp)
160
163
  );
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AAgNA;;;;;GAKG;AAEH;;;;GAIG;AACH,sCAHW,OAAO,GACN,OAAO,SAAS,EAAE,MAAM,CAwBnC;;;;;sBAjCY,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;2BAC7B;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE;2BAC5C,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;eACpD;IAAC,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CAAC,GAAG,cAAc,GAAG,mBAAmB,GAAG,mBAAmB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AAmNA;;;;;GAKG;AAEH;;;;GAIG;AACH,sCAHW,OAAO,GACN,OAAO,SAAS,EAAE,MAAM,CAwBnC;;;;;sBAjCY,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;2BAC7B;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE;2BAC5C,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;eACpD;IAAC,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CAAC,GAAG,cAAc,GAAG,mBAAmB,GAAG,mBAAmB"}