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

Support custom modifier separator #76

Merged
merged 8 commits into from Mar 24, 2016
Merged

Support custom modifier separator #76

merged 8 commits into from Mar 24, 2016

Conversation

blond
Copy link
Member

@blond blond commented Mar 23, 2016

Resolved #69

  • Add modValDelim field.
  • Support mod as object: mod: { name: String, val: String }.
  • Update convention by Harry Roberts: use mod: { name: '--', val: '_' }.

@blond
Copy link
Member Author

blond commented Mar 23, 2016

/cc @tadatuta @zxqfox @Yeti-or

@tadatuta
Copy link
Member

lgtm

@blond
Copy link
Member Author

blond commented Mar 24, 2016

🆙

@tadatuta
Copy link
Member

still lgtm :)

* **String** `name` — separates name of modifier from blocks and elements. Default as `_`.
* **String** `val` — separates value of modifier from name of modifier. Default as the value of the `name`.

* **String** `modVal` — separates value of modifier from name of modifier. Default as the value of the `mod` option.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looks like neprisheikpeacedeadrookave. Do we really need it?

* Support `mod` option as object
* Add `modValDelim` field
@blond
Copy link
Member Author

blond commented Mar 24, 2016

@zxqfox I removed modVal option.

@qfox
Copy link
Member

qfox commented Mar 24, 2016

👍 ok, thanks ;-)

@blond blond merged commit 441aabc into master Mar 24, 2016
@blond blond deleted the issue-69 branch March 24, 2016 22:09
qfox pushed a commit that referenced this pull request Jun 6, 2017
Update graceful-fs to version 4.1.11 🚀
@qfox qfox added the pkg:naming label Jul 2, 2017
@seyfer
Copy link

seyfer commented Mar 1, 2018

@blond
Hey, somebody could explain me, please, why more readable modifier delimiter -- replaced with _?
Who is Harry Roberts I know, I saw his articles, but I can't find one with the explanation and the decision there https://csswizardry.com/archive/

Also, you can notice that a lot of people not aware of changes and still use old way with -- in their BEM code. So, what the point?

For example, there it's still -- http://getbem.com/naming/
But in the docs, it is _ https://en.bem.info/methodology/naming-convention/

We are implementing BEM now in our team and we are confused.

@tadatuta
Copy link
Member

tadatuta commented Mar 1, 2018

@seyfer actually underscore was historically first demimiter originated from Yandex.
Double-dash version was introduced later and was mostly just a matter of taste.

But right now we tend to switch to so called React style.

Still the main point here is that any particular scheme does not matter while all the code base of a project is consistent.

@qfox
Copy link
Member

qfox commented Mar 1, 2018

@tadatuta Feels like we should make a faq for naming related questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants