css-color-function
css-color-function copied to clipboard
Support CSS Custom Properties as alpha value
I'm copying here an issue I opened in postcss-color-function
since looks like the bug is originating from this specific module:
Hi, I'm trying to use this module to assign a custom alpha value to some HEX values:
--opacity: .5 color: color(#000 alpha(var(--opacity)))
It should get transpiled to:
color: rgba(0,0,0, var(--opacity))
But what I get is:
color: rgb(0,0,0)
Am I doing something wrong, does this plugin supports this? If not, why? I understand that it can't work if I wanted to do color(var(--red), .5) because the plugin can't know the value of --red, but in this case it's simply a matter of keep the var instead of the alpha value.
Via | https://github.com/postcss/postcss-color-function/issues/37