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

inspect(&) returns result in parentheses #2018

Closed
nilssolanki opened this issue Apr 21, 2016 · 4 comments
Closed

inspect(&) returns result in parentheses #2018

nilssolanki opened this issue Apr 21, 2016 · 4 comments

Comments

@nilssolanki
Copy link

nilssolanki commented Apr 21, 2016

In my project (using gulp-sass and node-sass), one of my dependencies must have update its peer-dependencies, because suddenly when calling inspect(&) I'm getting results like the following:

(.form,) instead of .form, which it used to be before.

I first thought that this is a list, so I tried extracting it with nth(inspect(&), 1) but this didn't seem to work.

I don't think this is a gulp-sass or node-sass issue, or am I mistaken?

Is this an intentional change, and if so, where can I find more information about it?

Libsass-version seems to be 3.3.5.

@mgreter
Copy link
Contributor

mgreter commented Apr 21, 2016

This is correct and intentional to match the output of official ruby sass compiler!
BTW. & is a list and inspect converts it to a string (in a way it can be convert back).

@mgreter mgreter closed this as completed Apr 21, 2016
@nilssolanki
Copy link
Author

nilssolanki commented Apr 21, 2016

@mgreter this breaks a lot of my code...
Is this something that higher-level components would abstract back to the previous behaviour or is this intended to be exposed to the end users?

And how can I extract the values? nth(inspect(&), 1) does not seem to work.
Is there a recommended way to move from the previous behaviour to the new one without having to rewrite all the functions?

Some documentation would be really helpful. Thanks in advance.

@nilssolanki
Copy link
Author

nilssolanki commented Apr 21, 2016

@mgreter help me out here please.
I've tried the following:

$selector-list: nth(&, 1);
@debug $selector-list;

and I still get:

(.form,)

Am I completely off track?

@mgreter
Copy link
Contributor

mgreter commented Apr 21, 2016

OK, now you are on to something ...
The following is a bug in libsass:

form {
  sel: inspect(nth(&, 1));
}

Check #2020 for a workaround

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