Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Interpolated, double-quoted variable as a part of selector produces an empty output #1734

Closed
saper opened this issue Nov 13, 2015 · 6 comments

Comments

@saper
Copy link
Member

saper commented Nov 13, 2015

Extracted from #1684 case "1.2":

$key: 'bar';
.test12#{'\\@#{$key}'} { content: '1.2'; }

produces empty string on libsass 3.3.2, while Ruby Sass gives

.test12\@bar {
  content: '1.2'; }
@mgreter
Copy link
Contributor

mgreter commented Nov 14, 2015

Stripped down version:

foo {
    bar: #{'\\X'};
    baz: #{'\\#{X}'};
}

Libsass:

foo {
  bar: \X;
  baz: \\X; }

Sass:

foo {
  bar: \X;
  baz: \X; }

I wonder if this has changed over time on ruby sass or it may break other cases once I fix this one ...

@mgreter
Copy link
Contributor

mgreter commented Nov 14, 2015

As expected this is one of the interpolation behaviors I don't get and I'm therefore unable to produce a fix that will not break anything else. It might have to do with a rule I've picked up somewhere, that quoted string can only be unquoted once, even if you call unquote multiple times. IMO we don't do that for interpolations. If I make the changes to make this spec pass all double interpolations with escapes seem to fail.

@xzyfer xzyfer added this to the 3.4 milestone Dec 1, 2015
@mgreter mgreter modified the milestones: 3.3.3, 3.4 Jan 9, 2016
@mgreter mgreter self-assigned this Jan 9, 2016
@mgreter
Copy link
Contributor

mgreter commented Jan 9, 2016

This seems to be fixed with #1841
Added needs test since there is no issue_1734 spec test!?

@xzyfer
Copy link
Contributor

xzyfer commented Jan 12, 2016

Specs for this were added in sass/sass-spec#615

@mgreter
Copy link
Contributor

mgreter commented Jan 13, 2016

Seems like this was only halve fixed. Rescoping the rest to 3.3.4

@mgreter mgreter modified the milestones: 3.3.4, 3.3.3 Jan 13, 2016
mgreter added a commit to mgreter/sass-spec that referenced this issue Jan 20, 2016
mgreter added a commit to mgreter/sass-spec that referenced this issue Jan 20, 2016
@mgreter
Copy link
Contributor

mgreter commented Jan 20, 2016

I'm closing this as the only reason the specs fail (only on some CI configs) is because of #1786.
If you think that is not correct, please re-open!

@mgreter mgreter closed this as completed Jan 20, 2016
@mgreter mgreter added this to the 3.3.3 milestone Jan 20, 2016
@mgreter mgreter removed this from the 3.3.4 milestone Jan 20, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants