I
I
itgraine2020-02-24 11:44:56
css
itgraine, 2020-02-24 11:44:56

Block in element is that correct?

Hello!

Is it possible to nest other blocks in the elements of one block while adhering to bam?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
ha100790tag, 2020-02-24
@ha100790tag

yes, you can. The point is that the block is independent and wherever you put it, it should behave according to its tasks and styles written specifically for it. If the behavior of the block needs to be changed depending on the parent, then the approach called "changing the block by the context" is suitable for you, and here is a link to the official BEM documentation on this matter.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question