postcss / postcss-color-function

PostCSS plugin to transform W3C CSS color function to more compatible CSS
MIT License
325 stars 31 forks source link

support for currentcolor #2

Closed lionelB closed 9 years ago

lionelB commented 9 years ago

It would be nice to support color(currentcolor color-adjuster())

by the way, thx for this project !

MoOx commented 9 years ago

It's impossible since this will require computation on runtime. currentcolor depends on the cascade. I will add a note in the README.

lionelB commented 9 years ago

thx. I guess this apply also to the #3

stevenvachon commented 8 years ago

Could it not walk up the CSSOM to find a color definition? If none is found, default to black. I understand that this is not specification-compliant, but neither is this library's implementation of var().

MoOx commented 8 years ago

It just can't. We don't have the DOM and only the DOM say the truth.

stevenvachon commented 8 years ago

We don't necessarily need the truth when we're compiling.

MoOx commented 8 years ago

For the exact same reason postcss-custom-properties is limited to root, I will never this kind of stuff.

stevenvachon commented 8 years ago

Alright, fair enough.