getbem.github.io icon indicating copy to clipboard operation
getbem.github.io copied to clipboard

Using modifiers of other elements

Open stefan-1st opened this issue 7 years ago • 1 comments

Hey all,

i have to review code of some other guys that used BEM. I am not used to BEM so i am wondering if this is a correct use:

sh-headline sh-headline--super sh-text--white sh-text--no-line-height sh-headline--slogan-second-line

I am quite sure it is not. Is it? Quite similar is the following:

sh-textlink__icon sh-icon sh-icon--arrow-right-large

What do you think about this? Is this a regular use of the mix approach?

Kind regards Stefan

stefan-1st avatar Nov 06 '17 10:11 stefan-1st

@stefan-1st Yep, you should chose separator, that don't cross with words separator.

sh-headline--slogan-second-line

So, maybe sh-headline is a block name. But then i'm confusing. You can expect, that slogan is a element name and second-line is a him modifier name. But at the same time slogan-second-line may be full element name. So i find this naming is wrong.

f0rmat1k avatar Jan 19 '18 07:01 f0rmat1k