A
A
andreyWayne2017-11-14 11:15:28
BEM
andreyWayne, 2017-11-14 11:15:28

Did I understand the essence of using BEM correctly?

plnkr.co/edit/PxIEqLnKxKNgCF9PTEzp?p=catalogue
Sample code
Corrected version
plnkr.co/edit/PxIEqLnKxKNgCF9PTEzp?p=catalogue

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Bulba, 2017-11-14
@Xserber

There is no concept of "main block".
1. .logo__image - block element, only where the .logo block itself
2. .header__title - not a block, but an element
3. .title__h1 - element, only where the .title block itself
4. Modifiers are separated by "--" or "__" in depending on style.
Elements cannot be present on the page outside of their block.
Nested blocks and blocks without elements are allowed.
On youtube from HTML Academy there was a video with Makeev about BEM, I recommend that you read it. before documentation)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question