Answer the question
In order to leave comments, you need to log in
What properties should entities in BEM have?
Good day.
Help me unravel the BEM methodology =)
There is a block, an element, a modifier ( https://ru.bem.info).
1) b-content
2) __item
3) _red
What properties should elements have?
Block - positioning (except for external geometry in the form of border indents affecting dimensions)
Element - display inside the block.
Modifier - indicates what the entity should be like (red, disabled, etc.)
Block - ( position, display, float, width, height )
Element - ( text-align, padding, margin )
Modifier - ( color, font- weight )
Did you mess up anything?
Answer the question
In order to leave comments, you need to log in
It's not entirely clear what the question is. What properties are assigned to different elements according to BEM? Then they can be very different. And the element(E) can have width, position, and so on... The modifier(M) can have a lot of different properties, including the same width.
Here's an example for you:
<div class="header-social">
<a class="header-social__item header-social__item--twitter" href="https://twitter.com">Twitter</a>
<a class="header-social__item header-social__item--facebook" href="https://facebook.com">Facebook</a></div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question