Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Gonzales error #15

Closed
ai opened this issue Feb 7, 2015 · 5 comments
Closed

Gonzales error #15

ai opened this issue Feb 7, 2015 · 5 comments
Labels

Comments

@ai
Copy link
Contributor

ai commented Feb 7, 2015

If CSS contains url(./nevis-logo-subset.woff) it fails Gonzales

Error: Please check the validity of the CSS block starting from the line #0
    at throwError (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/node_modules/gonzales/lib/gonzales.cssp.node.js:399:15)
    at getFunctionBody (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/node_modules/gonzales/lib/gonzales.cssp.node.js:1233:17)
    at getFunktion (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/node_modules/gonzales/lib/gonzales.cssp.node.js:1212:13)
    at Object.CSSPRules.funktion (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/node_modules/gonzales/lib/gonzales.cssp.node.js:389:65)
    at _getAST (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/node_modules/gonzales/lib/gonzales.cssp.node.js:409:38)
    at exports.srcToCSSP (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/node_modules/gonzales/lib/gonzales.cssp.node.js:2287:16)
    at Object.exports.srcToCSSP (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/node_modules/gonzales/lib/gonzales.cssp.node.js:2292:16)
    at traverse (/home/ai/Dev/amplifr/front/node_modules/postcss-assets/lib/mapFunctions.js:35:23)
    at /home/ai/Dev/amplifr/front/node_modules/postcss-assets/lib/mapFunctions.js:56:16
    at Array.map (native)

But it is a valid CSS.

@ai
Copy link
Contributor Author

ai commented Feb 7, 2015

@borodean also please tell that you want from future PostCSS API to process functions in values: postcss/postcss#178

@ai
Copy link
Contributor Author

ai commented Feb 7, 2015

Also I have a custom plugin to inline SVG from Evil Icons.

But url() with SVG broke Gonzales:

url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2050%2050%22%20enable-background%3D%22new%200%200%2050%2050%22%3E%3Cstyle%3E*%7Bfill%3A%23e80e6c%7D%3C%2Fstyle%3E%3Cpath%20d%3D%22M9.6%2040.4l2.5-9.9L27%2015.6l7.4%207.4-14.9%2014.9-9.9%202.5zm4.3-8.9l-1.5%206.1%206.1-1.5L31.6%2023%2027%2018.4%2013.9%2031.5z%22%2F%3E%3Cpath%20d%3D%22M17.8%2037.3c-.6-2.5-2.6-4.5-5.1-5.1l.5-1.9c3.2.8%205.7%203.3%206.5%206.5l-1.9.5z%22%2F%3E%3Cpath%20d%3D%22M29.298%2019.287l1.414%201.414-13.01%2013.02-1.414-1.412z%22%2F%3E%3Cpath%20d%3D%22M11%2039l2.9-.7c-.3-1.1-1.1-1.9-2.2-2.2L11%2039z%22%2F%3E%3Cpath%20d%3D%22M35%2022.4L27.6%2015l3-3%20.5.1c3.6.5%206.4%203.3%206.9%206.9l.1.5-3.1%202.9zM30.4%2015l4.6%204.6.9-.9c-.5-2.3-2.3-4.1-4.6-4.6l-.9.9z%22%2F%3E%3C%2Fsvg%3E)

@ai
Copy link
Contributor Author

ai commented Feb 7, 2015

Maybe you should use reduce-function-call?

@borodean
Copy link
Owner

borodean commented Feb 7, 2015

I believe this on is due to special parsing rules for URL function which CSS has. I explisively convert all the url to funktion in Gonzales, and this time it fails.

Looks like an another argument to rename it.

@ai
Copy link
Contributor Author

ai commented Feb 13, 2015

You should write a commit, when you close a issue, because it is very diffult to understand how it was fixed and does it fixed right.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants