Closed yepninja closed 6 years ago
This plugin is not able to process your runtime. It's just simple static converter. If you want flexible color processing with css custom properties, use javascript libraries.
I understand that it is just static converter. But this problem can be solved, if user would transform custom properties before using color function. Mostly I talk about problem in cssnext. I think it better to write issue for cssnext. But in postcss-color-function would be useful to improve UX and process such errors
I see that it was fixed in https://github.com/postcss/postcss-color-function/pull/36
The plugins fails on custom property as color to transform:
It is possible to solve problem to use postcss-custom-properties before postcss-color-fucntion. But it is not good variant if custom properties are used in production. Also it is a problem when using cssnext with browserslist for modern browsers. It doesn't transform custom properties, but try to transform color function, what cause error.