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

[Sass] Empty selector declaration causes parse error #228

Open
bgriffith opened this issue Nov 2, 2016 · 3 comments
Open

[Sass] Empty selector declaration causes parse error #228

bgriffith opened this issue Nov 2, 2016 · 3 comments

Comments

@bgriffith
Copy link
Collaborator

bgriffith commented Nov 2, 2016

Currently empty declarations cause a parse error. Works fine in SCSS e.g. .foo {}.

universalSelector, typeSelector, class, shash, parentSelector, attributeSelector

Test cases - each one causes a parse error.

*

foo

.bar

#qux

.baz
  &-baz
  
[norf]
@tonyganch
Copy link
Owner

Oh my... This will take some time to figure out.
How would you like to parse it? With an empty block? Or just a ruleset with a lonely selector inside?
I guess empty block makes more sense for easy removing of empty rulesets?

@bgriffith
Copy link
Collaborator Author

I know right?! I had a quick look to see if there was an easy fix but quickly changed my mind 😆

Yep - a ruleset with an empty block would be best.

@DanPurdy
Copy link
Collaborator

DanPurdy commented Nov 3, 2016

That works for me too, definitely the best option i reckon.

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