C
C
colorkid2017-12-20 18:52:36
css
colorkid, 2017-12-20 18:52:36

Is it possible to use an element from the "Parent block" in the child block according to BEM?

Hello. There was a question on BEM, I just can’t figure out whether the following are correct or not.
Can BEM use an element from the "Parent block" in a child block?

<div class="block">
 <div class="block2">
   <div class="block__element"></div>
</div>
</div>

those. the element is inside another block and at the same time in "Native". What does BEM say about this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2017-12-20
@colorkid

Yes

F
Froggyweb, 2017-12-20
@Froggyweb

In my opinion - no. An example is moving block2 to another location. Then we decide that block1 is outdated and delete it. Everyone has arrived.... If an element needs to be reused in other blocks, then this is also a block.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question