postcss-minify-gradients 8.0.3 → 8.0.4
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 +3 -3
- package/src/index.js +1 -1
- package/src/isColorStop.js +12 -2
- package/types/isColorStop.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-minify-gradients",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"description": "Minify gradient parameters with PostCSS.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
34
|
-
"url": "cssnano/cssnano"
|
|
34
|
+
"url": "git+https://github.com/cssnano/cssnano.git"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@colordx/core": "^5.5.0",
|
|
38
38
|
"postcss-value-parser": "^4.2.0",
|
|
39
|
-
"cssnano-utils": "^6.0.
|
|
39
|
+
"cssnano-utils": "^6.0.4"
|
|
40
40
|
},
|
|
41
41
|
"bugs": {
|
|
42
42
|
"url": "https://github.com/cssnano/cssnano/issues"
|
package/src/index.js
CHANGED
package/src/isColorStop.js
CHANGED
|
@@ -4,7 +4,14 @@ const { colordx: colord, extend } = require('@colordx/core');
|
|
|
4
4
|
const hwbPlugin = require('@colordx/core/plugins/hwb');
|
|
5
5
|
const namesPlugin = require('@colordx/core/plugins/names');
|
|
6
6
|
|
|
7
|
-
extend([
|
|
7
|
+
extend([
|
|
8
|
+
/** @type {import('@colordx/core').Plugin} */ (
|
|
9
|
+
/** @type {unknown} */ (hwbPlugin)
|
|
10
|
+
),
|
|
11
|
+
/** @type {import('@colordx/core').Plugin} */ (
|
|
12
|
+
/** @type {unknown} */ (namesPlugin)
|
|
13
|
+
),
|
|
14
|
+
]);
|
|
8
15
|
|
|
9
16
|
/* Code derived from https://www.npmjs.com/package/is-color-stop Licensed under MIT license */
|
|
10
17
|
|
|
@@ -45,7 +52,10 @@ function isStop(str) {
|
|
|
45
52
|
const node = unit(str);
|
|
46
53
|
if (node) {
|
|
47
54
|
const number = Number(node.number);
|
|
48
|
-
if (
|
|
55
|
+
if (
|
|
56
|
+
number === 0 ||
|
|
57
|
+
(!Number.isNaN(number) && isCSSLengthUnit(node.unit))
|
|
58
|
+
) {
|
|
49
59
|
isColorStop = true;
|
|
50
60
|
}
|
|
51
61
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isColorStop.d.ts","sourceRoot":"","sources":["../src/isColorStop.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"isColorStop.d.ts","sourceRoot":"","sources":["../src/isColorStop.js"],"names":[],"mappings":";AAmEA;;;;GAIG;6BACmC,KAAK,EAJhC,MAIgC,EAAE,IAAI,AAH9C,CACA,EADQ,MAGsC,GAFrC,OAAO"}
|