Skip to content

Commit 7d5cb11

Browse files
author
blond
committed
docs(common-misconceptions): down info about common misconceptions
1 parent 099ee42 commit 7d5cb11

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ Table of Contents
4141
-----------------
4242

4343
* [String representation](#string-representation)
44-
* [Common misconceptions](#common-misconceptions)
4544
* [Object representation of BEM entity](#object-representation-of-bem-entity)
4645
* [API](#api)
46+
* [Common misconceptions](#common-misconceptions)
4747
* [Custom naming convention](#custom-naming-convention)
4848
* [Convention by Harry Roberts](#convention-by-harry-roberts)
4949

@@ -66,21 +66,6 @@ According to original BEM-naming convention it looks like the following:
6666
* Element's modifier in key-value format — `block-name__elem-name_mod-name_mod-val`.
6767
* Element's boolean modifier — `block-name__elem_mod`.
6868

69-
Common misconceptions
70-
---------------------
71-
72-
BEM methodology involves the use of flat structure inside a block. It means that BEM entity can not be represented as an element of the other element and the following string representation will be invalid:
73-
74-
```js
75-
'block__some-elem__sub-elem'
76-
```
77-
78-
Also there is no such BEM entity as a modifier and an element modifier simultaneously so the following string representation will be invalid:
79-
80-
```js
81-
'block_block-mod-name_block-mod-val__elem-name_elem-mod-name_elem-mod-val'
82-
```
83-
8469
Object representation of BEM entity
8570
-----------------------------------
8671

@@ -323,6 +308,21 @@ String to separate modifiers from blocks and elements.
323308

324309
String to separate value of modifier from name of modifier.
325310

311+
Common misconceptions
312+
---------------------
313+
314+
BEM methodology involves the use of flat structure inside a block. It means that BEM entity can not be represented as an element of the other element and the following string representation will be invalid:
315+
316+
```js
317+
'block__some-elem__sub-elem'
318+
```
319+
320+
Also there is no such BEM entity as a modifier and an element modifier simultaneously so the following string representation will be invalid:
321+
322+
```js
323+
'block_block-mod-name_block-mod-val__elem-name_elem-mod-name_elem-mod-val'
324+
```
325+
326326
Custom naming convention
327327
------------------------
328328

README.ru.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ bemNaming.stringify({ block: 'button', modName: 'checked' }); // button_checked
4141
----------
4242

4343
* [Строковое представление](#Строковое-представление)
44-
* [Частые заблуждения](#Частые-заблуждения)
4544
* [БЭМ-нотация](#БЭМ-нотация)
4645
* [API](#api)
46+
* [Частые заблуждения](#Частые-заблуждения)
4747
* [Собственный стиль](#Собственный-стиль)
4848
* [В стиле Гарри Робертса](#В-стиле-Гарри-Робертса)
4949

@@ -66,21 +66,6 @@ bemNaming.stringify({ block: 'button', modName: 'checked' }); // button_checked
6666
* Модификатор элемента в формате ключ-значение — `block-name__elem-name_mod-name_mod-val`.
6767
* Булевый модификатор элемента — `block-name__elem_mod`.
6868

69-
Частые заблуждения
70-
------------------
71-
72-
БЭМ-методология предполагает использование плоской структуры внутри блока, это означает, что БЭМ-сущность не может быть представлена как элемент элемента, и следующее строковое представление будет невалидным:
73-
74-
```js
75-
'block__some-elem__sub-elem'
76-
```
77-
78-
Также не бывает такой БЭМ-сущности, как модификатор блока и модификатор элемента одновременно, поэтому следующее строковое представление будет невалидным:
79-
80-
```js
81-
'block_block-mod-name_block-mod-val__elem-name_elem-mod-name_elem-mod-val'
82-
```
83-
8469
БЭМ-нотация
8570
-----------
8671

@@ -323,6 +308,21 @@ bemNaming.isElemMod({ block: 'block',
323308

324309
Строка для разделения значения модификатора от названия модификатора.
325310

311+
Частые заблуждения
312+
------------------
313+
314+
БЭМ-методология предполагает использование плоской структуры внутри блока, это означает, что БЭМ-сущность не может быть представлена как элемент элемента, и следующее строковое представление будет невалидным:
315+
316+
```js
317+
'block__some-elem__sub-elem'
318+
```
319+
320+
Также не бывает такой БЭМ-сущности, как модификатор блока и модификатор элемента одновременно, поэтому следующее строковое представление будет невалидным:
321+
322+
```js
323+
'block_block-mod-name_block-mod-val__elem-name_elem-mod-name_elem-mod-val'
324+
```
325+
326326
Собственный стиль
327327
-----------------
328328

0 commit comments

Comments
 (0)