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

Ampersand glued to the selector should be rejected #1822

Closed
saper opened this issue Jan 2, 2016 · 4 comments
Closed

Ampersand glued to the selector should be rejected #1822

saper opened this issue Jan 2, 2016 · 4 comments

Comments

@saper
Copy link
Member

saper commented Jan 2, 2016

This is from sass/node-sass#1324:

.btn {
    .open& {
        color: #000;
    }
}

as of https://github.com/sass/libsass/tree/13ae62def291c4934ad04d0d527e84b4021d60a3 produces:

.open& {
  color: #000; }

and this is rejected by Ruby Sass.

(I hope this is not a duplicate, the closest match I could find was #1491)

@saper
Copy link
Member Author

saper commented Jan 3, 2016

This should be the proper behaviour as of Sass 4.0 per sass/sass#1425

@xzyfer
Copy link
Contributor

xzyfer commented Jan 5, 2016

We'll leave this for the time being to see what happens with this in Ruby Sass.

@arkonan
Copy link

arkonan commented Jan 20, 2016

If sass/sass#1425 is trying to match LESS's behavior I would expect

.btn {
    .open& {
        color: #000;
    }
}

to produce

.open.btn {
  color: #000;
}

(rather than output the & into the CSS)

@xzyfer
Copy link
Contributor

xzyfer commented Jan 20, 2016

sass/sass#1425 is the correct place for that discussion.

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

4 participants