postcss-colormin 5.1.0 → 5.1.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.
- package/CHANGELOG.md +8 -0
- package/dist/colours.js +1 -18
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.1.1] (2021-05-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **postcss-colormin:** Strict color parsing ([#1122](https://github.com/cssnano/cssnano/issues/1122)) ([32771da](https://github.com/cssnano/cssnano/commit/32771da46ee94f07a6907ec47701189f90ad2ec0))
|
|
12
|
+
* **postcss-colormin:** fix ERR_PACKAGE_PATH_NOT_EXPORTED ([#1110](https://github.com/cssnano/cssnano/issues/1110)) ([8a31ca38796](https://github.com/cssnano/cssnano/commit/8a31ca38796e12e6fe52620cf8a545cb058fe295))
|
|
13
|
+
|
|
6
14
|
# [5.1.0](https://github.com/cssnano/cssnano/compare/postcss-colormin@5.0.0...postcss-colormin@5.1.0) (2021-05-19)
|
|
7
15
|
|
|
8
16
|
|
package/dist/colours.js
CHANGED
|
@@ -16,24 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
(0, _colord.extend)([_names.default]);
|
|
17
17
|
|
|
18
18
|
var _default = (colour, isLegacy = false) => {
|
|
19
|
-
|
|
20
|
-
/* check that it is a valid CSS value
|
|
21
|
-
https://www.w3.org/TR/css-color-4/#rgb-functions */
|
|
22
|
-
let percentCount = 0;
|
|
23
|
-
|
|
24
|
-
for (const c of colour) {
|
|
25
|
-
if (c === '%') {
|
|
26
|
-
percentCount++;
|
|
27
|
-
}
|
|
28
|
-
} // rgb values should either be all percentages or all numbers
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (percentCount !== 3 && percentCount !== 0) {
|
|
32
|
-
return colour;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const parsed = (0, _colord.colord)(colour.toLowerCase());
|
|
19
|
+
const parsed = (0, _colord.colord)(colour);
|
|
37
20
|
|
|
38
21
|
if (parsed.isValid()) {
|
|
39
22
|
const alpha = parsed.alpha();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-colormin",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "Minify colors in your CSS files with PostCSS.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"repository": "cssnano/cssnano",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"browserslist": "^4.16.0",
|
|
34
|
-
"colord": "^
|
|
34
|
+
"colord": "^2.0.0",
|
|
35
35
|
"postcss-value-parser": "^4.1.0"
|
|
36
36
|
},
|
|
37
37
|
"bugs": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"postcss": "^8.2.15"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "08ec284f116d1ce2605deb55dfe17ffe2835b38a"
|
|
50
50
|
}
|