getbem.github.io
getbem.github.io copied to clipboard
Using modifiers of other elements
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 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.