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

BEM conventions for all name formats #598

Closed
ncoden opened this issue Apr 5, 2016 · 9 comments
Closed

BEM conventions for all name formats #598

ncoden opened this issue Apr 5, 2016 · 9 comments

Comments

@ncoden
Copy link
Contributor

ncoden commented Apr 5, 2016

Hi

I use in my projects a BEM convention for both classes, variables, mixins and placeholders. I think it could be usefull to allow strictbem and hyphenatedbem conventions on them.

For exemple, a stupid use case:

$my-block__color--blue: blue;
$my-block__color--red: red;

@mixin my-block--blue {
  ...
}
@mixin my-block--red {
  ...
}

.my-block {
  ...

  // default
  @include my-block--blue;

  // modifiers
  &--blue { @include my-block--blue; }
  &--red  { @include my-block--red; }
}

Nicolas

@DanPurdy
Copy link
Member

DanPurdy commented Apr 5, 2016

@benthemonkey what do you think? I know you handled these rules previously.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 5, 2016

thank you for the quick response :)
On other repos much more popular, I have to wait for days ! (yes, i'm thinking of you Foundation)

@benthemonkey
Copy link
Member

@ncoden See our docs, we support strictbem and hyphenatedbem according to the same RegEx's as scss-lint.

Sorry for the delay.

@DanPurdy
Copy link
Member

@benthemonkey we dont for variables, mixins or placeholders though, I think that's the issue here, would it be worth adding these conventions to those?

@benthemonkey
Copy link
Member

Ah, sorry. Yeah I think it makes sense for all the format related rules to have identical configs.

@benthemonkey benthemonkey self-assigned this Apr 11, 2016
@ncoden
Copy link
Contributor Author

ncoden commented Apr 11, 2016

Ok. Can I make a PR or do you take care of that @benthemonkey ?

@benthemonkey
Copy link
Member

@ncoden go for it. Please be sure to update the docs as well. Thanks!

@ncoden
Copy link
Contributor Author

ncoden commented Apr 11, 2016

Pull request: #604
poke @benthemonkey

ncoden added a commit to ncoden/sass-lint that referenced this issue Apr 17, 2016
**Fix**: sasstools#598

**Changes**:
Add `strictbem ` and `hyphenatedbem` conventions for all naming rules:
- `function-name-format`
- `mixin-name-format`
- `placeholder-name-format`
- `function-name-format`

Add tests and examples in documentation for these naming conventions.
DanPurdy added a commit that referenced this issue Apr 17, 2016
Add BEM conventions for all naming rules #598
DanPurdy added a commit that referenced this issue Apr 17, 2016
Revert "Add BEM conventions for all naming rules #598"
ncoden added a commit to ncoden/sass-lint that referenced this issue Apr 17, 2016
**Fix**: sasstools#598

**Changes**:
Add `strictbem ` and `hyphenatedbem` conventions for all naming rules:
- `function-name-format`
- `mixin-name-format`
- `placeholder-name-format`
- `function-name-format`

Add tests and examples in documentation for these naming conventions.
@DanPurdy
Copy link
Member

DanPurdy commented Apr 22, 2016

This is available and resolved in sass-lint 1.6.0 thanks @ncoden

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