D
D
dmitry_polakov2021-02-10 09:22:17
css
dmitry_polakov, 2021-02-10 09:22:17

How to set float to bam block?

Hello . If you create a block according to the BEM methodology, then how to set it to float.
It seems to me that you need to use a modifier, but then it is not clear what the name of the modifier should be.
Or you need to wrap a block in a container and set a property to the container.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
smigles, 2021-02-10
@smigles

According to BEM, the block must be relatively independent of the environment, that is, it cannot be positioned relative to external entities. Therefore, float should be specified via a block element or an element modifier, for example:

.article__image--right {
  float: right;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question