E
E
eldar_web2017-01-11 22:36:35
css
eldar_web, 2017-01-11 22:36:35

And what prevents BEM layout from making everything blocks instead of elements?

Yes, what's stopping you?
What principles will be violated?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
U
uniquenicknqame, 2017-01-11
@uniquenicknqame

In this regard, BEM is nothing more than a class naming convention.
But it is necessary that when you start working on a large project in a large team, so that you can quickly read someone else's code, and your colleagues, because on a large project it is extremely difficult to understand in a month:

.sgrm_left_container .sgrm_dss_column{

}

what about???
In addition to BEM, there is also a whole galaxy of all sorts of bootstraps, grids, etc.

O
Oleg, 2017-01-11
@werty1001

And what prevents BEM layout from making everything blocks instead of elements? What principles will be violated?

Obviously, the principles of BEM. How will you position blocks without elements? Hang all sorts of floats on blocks, add indents to them? So it's not BEM anymore.

S
Sergey ZSA, 2017-01-11
@serjikz

I wrote a little about this in the last question. What's the point of BEM then? Did you decipher the name BEM itself? BEM - block, element, modifier. Let's throw out the elements and modifiers, only the blocks remain. So what? Why do we need it then?

D
dom1n1k, 2017-02-02
@dom1n1k

A block is something that has semantic independence, which can be used separately, transferred to another page, etc.
An element is something that is included in a block as an integral part and cannot be used separately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question