segmentio / myth

A CSS preprocessor that acts like a polyfill for future versions of the spec.
4.32k stars 130 forks source link

Color function not outputting as spec'd #38

Closed krry closed 10 years ago

krry commented 10 years ago

I began seeing unexpected outputs from my color functions, so I peeled them back to the examples given in the docs.

This input:

:root {
  var-green: #008752;
}
div {
  color: color(var(green) shade(20%));
}

Yields this output:

div {
  color: color(#008752 shade(20%));
}

I've checked my syntax enough that I have no idea if it's correct. Even read through Tab's spec here. Is anyone else seeing this behavior?

ianstormtaylor commented 10 years ago

hmm, weird. i can't replicate locally here's what i'm getting:

☁ node
> var myth = require('myth');
undefined
> myth(':root { var-green: #008752; } div { color: color(var(green) shade(20%)); }');
'\n\ndiv {\n  color: rgb(0, 108, 66);\n}'

what version of myth are you using? and what version of rework-color-function is being used as well? not sure what's going on

krry commented 10 years ago

I installed today with npm -g. but... I did not require it or add it to package.json, which seems like that's the cause of my compilation fail.

Thanks!

On Feb 3, 2014, at 19:40, Ian Storm Taylor notifications@github.com wrote:

hmm, weird. i can't replicate locally here's what i'm getting:

☁ node

var myth = require('myth'); undefined myth(':root { var-green: #008752; } div { color: color(var(green) shade(20%)); }'); '\n\ndiv {\n color: rgb(0, 108, 66);\n}' what version of myth are you using? and what version of rework-color-function is being used as well? not sure what's going on

— Reply to this email directly or view it on GitHub.