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

Rule idea: variable-name-space-after #52

Closed
bjankord opened this issue Jun 29, 2016 · 3 comments
Closed

Rule idea: variable-name-space-after #52

bjankord opened this issue Jun 29, 2016 · 3 comments

Comments

@bjankord
Copy link
Contributor

This rule idea comes from scss-lint's Space After Variable Name rule

From the scss-lint docs:

Variables should be formatted with no space between the name and the colon.

Bad: space before colon

$my-var : 0;

Good

$my-var: 0;
@dryoma
Copy link
Collaborator

dryoma commented Jul 4, 2016

Thanks, definitely a must.

In the meantime, stylelint's declaration-colon-space-before and other declaration-colon- rules could help a bit, with variables declared inside rulesets.

@jeddy3
Copy link
Collaborator

jeddy3 commented Jul 4, 2016

In the meantime, stylelint's declaration-colon-space-before and other declaration-colon-* rules could help a bit, with variables declared inside rulesets.

It's interesting that declaration-colon-space-before only ignores unnested dollar variables at the moment. You could argue that it is should ignore them all, and that it is an oversight that it doesn't already. Either way, I doubt we'll change the behaviour until you guys have:

  • dollar-variable-colon-space-after
  • dollar-variable-colon-space-before

Which would check the spaces around dollar variable colons, whether nested or not. As, as you said, it's useful at the moment :)

@dryoma
Copy link
Collaborator

dryoma commented Jul 26, 2016

Published with 1.3.0.

@dryoma dryoma closed this as completed Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants