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

Parsing of directives creating confusing error messages #855

Closed
anlutro opened this issue Jan 22, 2015 · 2 comments
Closed

Parsing of directives creating confusing error messages #855

anlutro opened this issue Jan 22, 2015 · 2 comments

Comments

@anlutro
Copy link
Contributor

anlutro commented Jan 22, 2015

I just spent way too much time hunting down an error that turned out to be me just typing @extends instead of @extend.

The error message you get when you do this is "nested selectors may not be extended", which had me on a wild goose chase.

On further inspection it turns out that @extend %foo and @extend%foo both work fine and yield the same result, so what @extends %foo was really parsing down to was @extend s %foo.

Is this part of the SASS spec? I think enforcing the whitespace here would be the sane thing to do.

@xzyfer
Copy link
Contributor

xzyfer commented Feb 16, 2015

@anlutro could you please put together a http://sassmeister.com/ of the behaviour you're describing?

@anlutro
Copy link
Contributor Author

anlutro commented Feb 16, 2015

http://sassmeister.com/gist/f0f08a8f6706f4e573e8

As you can see, because it says @extends instead of @extend the Ruby Sass parser just leaves the line alone, assuming it's valid CSS. Compiling the same Sass with libsass yields a compiler error for the reasons stated above.

mgreter added a commit to mgreter/libsass that referenced this issue Mar 7, 2015
@mgreter mgreter added this to the 3.2 milestone Mar 7, 2015
@mgreter mgreter self-assigned this Mar 7, 2015
@mgreter mgreter closed this as completed in 8c98da8 Mar 8, 2015
mgreter added a commit that referenced this issue Mar 8, 2015
Fix parsing and output of unknown at-rules (Fixes #855)
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

3 participants