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

Negative Interpolation Variable Error #344

Closed
spencerbaynton opened this issue Apr 28, 2014 · 2 comments · Fixed by #746
Closed

Negative Interpolation Variable Error #344

spencerbaynton opened this issue Apr 28, 2014 · 2 comments · Fixed by #746

Comments

@spencerbaynton
Copy link

spencerbaynton commented Apr 28, 2014

$variable: 1;

$interpolation: #{$variable}px;

div {
  top: -$interpolation;
}

Expected (3.3.5 and 3.2.19) output:

div {
  top: -1px;
}

libsass output:

div {
  top: -$interpolation; }
@nschonni
Copy link
Collaborator

It's a hack, but the following works

$variable: 1;

$interpolation: #{$variable}px;

div {
  top: unquote("" -$interpolation);
}

Converts it to a string, and then unquotes the value

@HamptonMakes
Copy link
Member

This is definitely an error I've seen and we need to fix it. This is a very clean test case!

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

Successfully merging a pull request may close this issue.

4 participants