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

Error incorrectly thrown for &__ selector #1825

Closed
xzyfer opened this issue Jan 5, 2016 · 2 comments
Closed

Error incorrectly thrown for &__ selector #1825

xzyfer opened this issue Jan 5, 2016 · 2 comments

Comments

@xzyfer
Copy link
Contributor

xzyfer commented Jan 5, 2016

Originally reported sass/node-sass#1329.

Turns out this is valid Sass.

foo {
  &-- {
    &baz {
      color: red;
    } } } 

Ruby Sass

foo--baz {
  color: red;
}

LibSass

Error: Invalid CSS after "foo {": expected "}", was "&-- {"
        on line 25 of test.scss
>> foo {
   -----^

It's worth noting that &__ compiles correctly.

foo {
  &__ {
    &baz {
      color: red;
    } } }
foo__baz {
  color: red;
}

Spec sass/sass-spec#670

@xzyfer xzyfer added this to the 3.4 milestone Jan 5, 2016
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Jan 5, 2016
@mgreter
Copy link
Contributor

mgreter commented Jan 6, 2016

Reason why __ works, is because the following is valid

__ {
  foo: bar;
}

While the following is not:

-- {
  foo: bar;
}

Knowing that a fix should be pretty simple.

@xzyfer
Copy link
Contributor Author

xzyfer commented Jan 6, 2016

Please activate the spec @mgreter

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

2 participants