-
Notifications
You must be signed in to change notification settings - Fork 464
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
@at-root and #{&} produces incorrect output #1210
Comments
This PR add specs for sass/libsass#1210
/cc @suisho |
Spec added sass/sass-spec#382 |
Also struggling a little with this issue. I've been using it (perhaps unwisely) without mixins, for example in this example where the
This is the one thing stopping me utilising libsass fully on some of my websites so I'm going to watch keenly for a fix! |
Regardless of use with mixin or not, the issue persists when trying to create a combination selector based off the parent in the Sass using a child selector. In this example, the desired output from rubySass is not the same as libSass. .parent {
width: 100%;
@at-root .child#{&} {
width: 50%;
}
} rubySass
libSass
Give it a run in SassMeister to see. |
I've run some quick tests and It looks like a bug was introduced in 3.2.3 or 3.2.4. |
Base on @danielguillan new information I dug in a big further and found this is a regression introduced in 3f536a9 in #1183. I'll see about getting a patch for this into 3.2.5 since there's significant demand for it. |
I've had a quick look into this and unfortunately there are a lot of edge cases. We need significantly more coverage in sass-spec before we're able to tackle this. |
I'll be happy to help with the spec. What are some of those edge cases? |
It's hard to know all of the cases. You can pretty much take any piece of the following and rearrange to hit a different code path.
Some examples off the top of my head are as follows.
|
A good example of what these specs should be like is out at-root specs (ignore the directories starting with numbers). https://github.com/sass/sass-spec/tree/master/spec/libsass/at-root |
@xzyfer Just added the new specs. I hope most of the cases are being covered now. |
Spec updated in sass/sass-spec#403 |
The issue is not only with #{&} but with all the interpolations.
The aspected result would be:
But instead we'll have:
Temporary fix for me was:
Thanks all |
This is fixed and will be 3.3 |
Any chance to get 3.3 in the next few days? I would gladly wait and switch from ruby version before i release a package that i'm working on. Edit: Ah, i see there are still quite a few issues before 3.3 milestone. Oh well :) |
@chetzof no. We're not expecting 3.3 to land until some time in August. |
thanks! |
Great news, thanks for the update @xzyfer |
Ruby Sass
Libsass 3.2.4
The text was updated successfully, but these errors were encountered: