Skip to content

Commit 659691b

Browse files
authored
Update postcss values parser to v3.0.5 (#146)
1 parent 62ec70a commit 659691b

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

package-lock.json

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"is-vendor-prefixed": "^3.3.0",
6969
"path": "^0.12.7",
7070
"postcss": "^7.0.17",
71-
"postcss-values-parser": "^3.0.4",
71+
"postcss-values-parser": "^3.0.5",
7272
"specificity": "^0.4.1",
7373
"split-lines": "^2.0.0",
7474
"string-natural-compare": "^2.0.3",

src/analyzer/values/colors.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ const uniquer = require('../../utils/uniquer')
77
function extractColorsFromDeclaration(declaration) {
88
const colors = []
99

10-
// Temporary try-catch until https://github.com/shellscape/postcss-values-parser/issues/76 is fixed
10+
// Try-catch to ignore values that cannot be parsed with postcss-values-parser
11+
// Examples:
12+
// - Base64-encoded images
13+
// - startColorstr=\'#5243AA\', endColorstr=\'#0079bf\', GradientType=1
14+
// - opacity=50
15+
// - 1.5deg
1116
try {
1217
parse(declaration.value, {loose: true}).walk(node => {
1318
if (node.isColor) {

0 commit comments

Comments
 (0)