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

Variable concatenation with interpolation adds a space in between #1158

Closed
ausi opened this issue May 1, 2015 · 0 comments · Fixed by #1177
Closed

Variable concatenation with interpolation adds a space in between #1158

ausi opened this issue May 1, 2015 · 0 comments · Fixed by #1177

Comments

@ausi
Copy link

ausi commented May 1, 2015

Concatenating a variable with an interpolation like $input#{$input} shouldn’t add a space between them.

$input: literal;
.result {
  output: $input#{$input};
}

Should generate this output, as RubySass does:

.result {
  output: literalliteral; }

The actual output of LibSass 3.2.2 is:

.result {
  output: literal literal; }

A complete test case of all combinations of literal, $input, #{$input}, #{literal}, #{"literal"} can be found here: sass/sass-spec/tree/1a35b2b/spec/parser/interpolate/01_literal/07_variable_concatenation

The correct behavior is described in sass/sass#1704 (comment)

@mgreter mgreter added this to the 3.2.3 milestone May 8, 2015
@mgreter mgreter self-assigned this May 8, 2015
mgreter added a commit to mgreter/libsass that referenced this issue May 8, 2015
Declaration values should be parsed as a string-schema if
it contains any interpolations. To decide this we need to
look-ahead, as we already do with selectors and mixins.

Fixes sass#1158
mgreter added a commit to mgreter/libsass that referenced this issue May 8, 2015
Declaration values should be parsed as a string-schema if
it contains any interpolations. To decide this we need to
look-ahead, as we already do with selectors and mixins.

Fixes sass#1158
mgreter added a commit to mgreter/libsass that referenced this issue May 9, 2015
Declaration values should be parsed as a string-schema if
it contains any interpolations. To decide this we need to
look-ahead, as we already do with selectors and mixins.

Fixes sass#1158
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.

2 participants