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

Namescaped variables #97

Open
zuojiang opened this issue May 16, 2017 · 0 comments
Open

Namescaped variables #97

zuojiang opened this issue May 16, 2017 · 0 comments

Comments

@zuojiang
Copy link

zuojiang commented May 16, 2017

// values.css

@value size10: 26.66rem;
@value size20: 53.33rem;
...
@value size200: 533.33rem;

// style.css

@vlaue sizes: "./values.css"
@value (
  size10,
  size20,
  ...
  size200
)  from sizes;

div {
  width: size20;
}

It's normal, but too many variables need to be imported!

Is there a similar way?

div {
  width: var(sizes.size20);
}
/*or*/
div {
 width: $sizes.size20;
}
/*or*/
div {
  width: size20 from sizes;
}

How to configure with React and Webpack?

@TrySound TrySound changed the title How to reference variables? Namescaped variables May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants