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

Incorrect Invalid Selector Warning #1168

Closed
shaunbent opened this issue May 7, 2015 · 3 comments · Fixed by #1174
Closed

Incorrect Invalid Selector Warning #1168

shaunbent opened this issue May 7, 2015 · 3 comments · Fixed by #1174

Comments

@shaunbent
Copy link

I've just tried to update to the latest version of libsass and started getting compiled errors on code which compiled correctly in the past.

I am getting an invalid selector after error when I try to escape a backslash in my selector. For example:

$namespace: 'test-';
$column: 1;

.#{$namespace}#{$column}\/#{$column} {
  width: 100% !important;
}

The expected the output, which is a valid selector:

.test-1\/1 {
  width: 100% !important;
}

This has worked correctly previously and compiles correctly when using ruby Sass. I've put this example in a SassMeister file: http://sassmeister.com/gist/b32cd8f14c7d3a9524c4

Hopefully its not being being stupid.

@xzyfer
Copy link
Contributor

xzyfer commented May 7, 2015

HI @shaunbent thanks for the report. You're correct this is a regression.

Could you please open a sass-spec PR to help us fix this as soon as possible. Here's a good template to follow https://github.com/sass/sass-spec/pull/343/files

@mgreter
Copy link
Contributor

mgreter commented May 7, 2015

For the time being you should be able to use

$namespace: 'test-';
$column: 1;

.#{$namespace}#{$column}#{\/}#{$column} {
  width: 100% !important;
}

@shaunbent
Copy link
Author

That was fast - I was going to write the test you requests tonight.

Brilliant - thanks for this.

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.

3 participants