Skip to content

Commit

Permalink
Merge d80f3e2 into 62ec70a
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman committed Jul 2, 2019
2 parents 62ec70a + d80f3e2 commit e7f4af2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -68,7 +68,7 @@
"is-vendor-prefixed": "^3.3.0",
"path": "^0.12.7",
"postcss": "^7.0.17",
"postcss-values-parser": "^3.0.4",
"postcss-values-parser": "^3.0.5",
"specificity": "^0.4.1",
"split-lines": "^2.0.0",
"string-natural-compare": "^2.0.3",
Expand Down
7 changes: 6 additions & 1 deletion src/analyzer/values/colors.js
Expand Up @@ -7,7 +7,12 @@ const uniquer = require('../../utils/uniquer')
function extractColorsFromDeclaration(declaration) {
const colors = []

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

0 comments on commit e7f4af2

Please sign in to comment.