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

Variables not being parsed by calc() #1766

Closed
corysimmons opened this issue Nov 21, 2014 · 3 comments
Closed

Variables not being parsed by calc() #1766

corysimmons opened this issue Nov 21, 2014 · 3 comments

Comments

@corysimmons
Copy link

http://codepen.io/corysimmons/pen/OPPapQ

Not sure if I'm doing something wrong, but I'd expect ratio and gutter to be parsed and the calc rule read: width: calc(100% * 1/3 - 30px + 1/3 * 30px)

@corysimmons
Copy link
Author

I was able to fix this using width: s('calc(100% * %s - %s + %s * %s)', ratio, gutter, ratio, gutter) but it still seems a bit confusing.

@Panya
Copy link
Member

Panya commented Nov 21, 2014

It is intended behavior, we don't parse calc, so you should use s or % in this case.

@Panya Panya closed this as completed Nov 21, 2014
@Panya
Copy link
Member

Panya commented Nov 21, 2014

It will be better with a string interpolation support (in 1.0)

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