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

scss and Uncaught TypeError: Cannot read property '0' of null #23

Closed
dsandstrom opened this issue Jul 19, 2014 · 7 comments
Closed

scss and Uncaught TypeError: Cannot read property '0' of null #23

dsandstrom opened this issue Jul 19, 2014 · 7 comments

Comments

@dsandstrom
Copy link

Started happening after you added scale-color.

test.scss

$factor: 10%;
$border-color: scale-color(blue, $lightness: $factor);
@dsandstrom
Copy link
Author

It's fine if you can't support this, kind of a edge case.

@abe33
Copy link
Owner

abe33 commented Jul 20, 2014

Thanks for the information, I'm not sure if I be able to handle it correctly, but at least I'll be able to prevent an error to be raised.

abe33 added a commit that referenced this issue Jul 20, 2014
Includes the fix for #23
@abe33
Copy link
Owner

abe33 commented Jul 20, 2014

Fixed, and I was also able to use previously defined variables in all sass/less/stylus functions.

@abe33 abe33 closed this as completed Jul 20, 2014
@dsandstrom
Copy link
Author

Excellent. I know you're getting sick of me, but...

Uncaught TypeError: Cannot read property 'value' of undefined 

test.scss

$function-factor: -7%;
$bg: scale-color(#fff, $lightness: $function-factor);
$border-color: scale-color($bg, $lightness: $function-factor);

Blame foundation for all of these.

@abe33
Copy link
Owner

abe33 commented Jul 21, 2014

Hmm, not sure what's going on here, seems like the variables are not passed properly in that case...

@abe33
Copy link
Owner

abe33 commented Jul 21, 2014

I forgot to pass the variable hash to the Color constructor when building a color from a variable (like the $border-color variable in your example that require $bg to be created using the $function-factor variable)

@dsandstrom
Copy link
Author

Thank you. Works well now. PS I really like the color marker at the end of the line.

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

2 participants