W
W
webquestions2015-12-14 11:43:53
BEM
webquestions, 2015-12-14 11:43:53

BEM how to be? Did I understand everything correctly?

Hello, I want to clarify some nuances
. For example, I have 2 blocks on the
left and on the right.
The left block contains just text, everything is clear with it in a block, since there are similar ones in layout, The
right one contains an authorization form, this is where the fun begins.
If you take a little earlier, then all this is a left and right block is also a block that is nested in the element
, now we have a left and right block again nested in the elements,
after which in the right block there are more blocks of input blocks with an icon on the left and a button block and all these blocks as well wet into the elements, is everything correct?
Blocks are naturally laid out without positioning, for this I use elements, which is why wild nesting is formed, it is worth using blocks and elements on the same level

.block
  .block__elem .panel
      .panel__elem .input
нежели вот так
.block
  .block__elem 
      .panel
        .panel__elem
            .input

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kravchenko, 2015-12-14
@mydearfriend

both options have the right to life,
the first is called a mix

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question