M
M
Monty Python2017-08-26 00:40:44
BEM
Monty Python, 2017-08-26 00:40:44

According to BEM, what should I create a folder for each block? "Header" has its own folder, "main" has its own, and "footer" has its own?

Does each block of code need its own separate directory?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
i, 2017-08-26
@Austin1

It's not obligatory. The official documentation discusses different file structure schemes. The package for each block is Nested , there are also Flat and Flex for more details in the article Organizing the file structure .
It is worth noting all this recommendation, you can get by with only two files style.css and script.js , it is only important to divide the composition into blocks, elements and modifiers.
The whole point is in three letters - BEM, the rest are tools and personal preferences.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question