K
K
kid-programmer2015-10-12 10:47:29
css
kid-programmer, 2015-10-12 10:47:29

BEM. Not a concept of basic concepts - block, element, modifier?

An element is an integral part of a block that cannot be used in isolation from it. (from off-dock)

.post{}
.post__date{} // может использоваться как дата в комментариях к посту
.post__header{} //может использоватся как заголовок страницы
.post__body{} //может использоватся в том же комментарии

if you think about it, then any element, any block can be reused somewhere, then this is not an element but a block. As a result, it turns out that everything can be represented as blocks and their modifiers, and the block will be empty or have minimal styles so that it can be used in other projects and parts of the vertex. It turns out that the block is purely a Namespace for other entities.
<div class="post"> 
   <div class="header header_post">Заголовок поста</div>
   <div class="date date_post">19.19.1900</div>
   <div class="body body_post">текст</div>
</div>
<div class="comment"> 
   <div class="date date_comment">19.19.1900</div>
   <div class="body body_comment">текст</div>
</div>

Above html by BEM or not? then what is an element?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Think With Your Head, 2015-10-12
@kid-programmer

BEM is a hat.
Too many contradictions and waste of time.
Yuzay smacss, you can in conjunction with OOCSS

A
Antony Bark, 2015-10-22
@tolfy

bem hat.bem2.pngbem1.gif

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question