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

Error when using multiple interpolations in nth-child divided with minus and spaces #2346

Closed
Anomeon opened this issue Mar 4, 2017 · 1 comment

Comments

@Anomeon
Copy link

Anomeon commented Mar 4, 2017

input.scss (same error for sass syntax)

$items: 3;
li {
  &:nth-child(#{$items}n - #{$items}) {
    color: red;
  }
}

libsass 3.5.0.beta.2 and 5cfdd12

Invalid CSS after "li {": expected "}", was "&:nth-child(#{$item" on line 2 at column 5

ruby sass 4.0.0.alpha.1 and 3.4.21

li:nth-child(3n - 3) {
  color: red;
}

version info:

$ node-sass --version
node-sass	4.5.0	(Wrapper)	[JavaScript]
libsass  	3.5.0.beta.2	(Sass Compiler)	[C/C++]

without spaces works:

$items: 3;
li {
  &:nth-child(#{$items}n-#{$items}) {
    color: red;
  }
}

libsass 3.5.0.beta.2 and 5cfdd12

li:nth-child(3n-3) {
  color: red;
}

Spec sass/sass-spec#1093

mgreter added a commit to mgreter/sass-spec that referenced this issue Mar 10, 2017
mgreter added a commit to mgreter/libsass that referenced this issue May 20, 2017
Make more permissive and allow spaces around dashes.
mgreter added a commit that referenced this issue May 21, 2017
Improve selector and binominal look ahead (#2346)
@mgreter
Copy link
Contributor

mgreter commented May 21, 2017

This should be fixed by #2390

@mgreter mgreter closed this as completed May 21, 2017
@mgreter mgreter self-assigned this May 21, 2017
mgreter added a commit that referenced this issue May 21, 2017
Make more permissive and allow spaces around dashes.
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