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

Not Getting Expressions To Work AssertionError #8

Closed
ryantallmadge opened this issue Mar 3, 2016 · 1 comment
Closed

Not Getting Expressions To Work AssertionError #8

ryantallmadge opened this issue Mar 3, 2016 · 1 comment

Comments

@ryantallmadge
Copy link

Im getting and error:

AssertionError: /PATH/TO/PAGE : invalid value expression type while parsing file /PATH/TO/SAME/PAGE

I have a simple CSS:

main.js

var colors = require('../styles/colors'); var pageCss = cssInJS({ 'default' : { 'backgroundColor' : colors.greys._1 } });

colors.js

var colors = { 'greys' : { _1 : '#F2F5F8' } }; module.exports = colors;

@martinandert
Copy link
Owner

Yeah this is because nothing is actually required and compiled when babel does its transformation magic. However, what you trying to do can be achieved with the context option. See also the section "Expressions in Style Rules" in the README.

If you have any further question, feel free to ask.

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