Skip to content
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

Object #<Object> has no method 'blackness' #2

Closed
MoOx opened this issue May 20, 2014 · 8 comments
Closed

Object #<Object> has no method 'blackness' #2

MoOx opened this issue May 20, 2014 · 8 comments

Comments

@MoOx
Copy link
Collaborator

MoOx commented May 20, 2014

Just got the issue with blackness, not sure why since it seems correctly exported in lib/index.js

events.js:72
        throw er; // Unhandled 'error' event
              ^
TypeError: Object #<Object> has no method 'blackness'
    at Object.<anonymous> (/colortest/node_modules/rework-color-function/node_modules/css-color-function/lib/adjusters.js:106:35)
    at /colortest/node_modules/rework-color-function/node_modules/css-color-function/lib/convert.js:56:20
    at Array.forEach (native)
    at toRGB (/colortest/node_modules/rework-color-function/node_modules/css-color-function/lib/convert.js:42:7)
    at Object.convert (/colortest/node_modules/rework-color-function/node_modules/css-color-function/lib/convert.js:28:10)
    at convert (/colortest/node_modules/rework-color-function/lib/index.js:65:41)
    at declaration (/colortest/node_modules/rework-color-function/lib/index.js:41:17)
    at Array.forEach (native)
    at rule (/colortest/node_modules/rework-color-function/lib/index.js:28:42)
    at Array.forEach (native)

Note: I tested lightness() which work as expected.

@MoOx
Copy link
Collaborator Author

MoOx commented Jun 27, 2014

Just got the same with whiteness, any idea @ianstormtaylor ? BEFORE I MAKE A IMPULSIVE RESEARCH + PULL REQUEST ? :D

@ianstormtaylor
Copy link
Owner

Hmm weird, might check if the color modules used in rework-color-function got updated or something? What's the CSS color function that was triggering it?

@MoOx
Copy link
Collaborator Author

MoOx commented Jun 27, 2014

rework-color-function use "css-color-function": "0.1.0" so seems to be up to date.

:root {
  --main: #48985f;
  --works: color(var(--main) lightness(90%));
  --doesnt: color(var(--main) whiteness(90%));
}

a {
  color: var(--works);
  color: var(--doesnt);
}

With current myth (master)

@ianstormtaylor
Copy link
Owner

Ah. I think I skipped implementing whiteness and blackness now that I remember, because the color modules we're using don't have a simple way of doing it? If I recall correctly.

@ianstormtaylor
Copy link
Owner

But I'm super down to have it added

@MoOx
Copy link
Collaborator Author

MoOx commented Jul 17, 2014

I've a PR ready for that, just waiting for this one to be merged Qix-/color#25

@ianstormtaylor
Copy link
Owner

nice!

@DamonOehlman
Copy link

Awesome - I just tried using whiteness and hit a similar issue so it will be great to see these too supported :)

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

No branches or pull requests

3 participants