Correct order of the BEM (naming)
luis-pato opened this issue · 7 comments
I have been reading about BEM and i find it really interesting.
Concerning the order in the naming convention i have seen two contradictory ideas, so i though i would write you to clear this up.
In some places i have seen that in BEM you always have to write block__element--modifier
(in this order).
In other places i have read we can actually use block--modifier__element
.
( i think the example was .person--female__hand
).
I can see some reasons for using both, but was wondering what you recommend.
Thanks!
According to http://getbem.com/naming/ block__element--modifier
is proper. block--modifier__element
isn't mentioned.
The author is referring to this article https://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/
☝️
BEM.info is against block modifier element
Thanks @himedlooff, i'll take a look at those links!
@rokumatsumoto thanks, i'll take a look! 😄