Skip to content

Unanable to use with custom properties #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yepninja opened this issue Sep 1, 2017 · 3 comments
Closed

Unanable to use with custom properties #42

yepninja opened this issue Sep 1, 2017 · 3 comments
Labels

Comments

@yepninja
Copy link

yepninja commented Sep 1, 2017

The plugins fails on custom property as color to transform:

.foo {
     color: color(var(--color) a(.5));
}

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.

@TrySound
Copy link
Member

TrySound commented Sep 1, 2017

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.

@yepninja
Copy link
Author

yepninja commented Sep 3, 2017

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

@Semigradsky Semigradsky added the bug label Nov 3, 2017
@Semigradsky
Copy link
Member

I see that it was fixed in #36

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

No branches or pull requests

3 participants