Answer the question
In order to leave comments, you need to log in
What is the correct division of files in BEM?
The BEM methodology requires a new file to be created for each block.
Let's say we have a structure like this
<div class='wrapper'>
<header>
<div class='block-1'>
<div class='block-1__elem-1'>
</div>
</div>
</header>
<section class='section-1'>
<div class='block-2'>
<div class='block-2__elem-1'>
</div>
</div>
<div class='block-3'>
<div class='block-3__elem-1'>
</div>
</div>
</section>
<section class='section-2'>
<div class='block-4'>
<div class='block-4__elem-1'>
</div>
</div>
</section>
<footer>
</footer>
</div>
Answer the question
In order to leave comments, you need to log in
in which file do we style the .wrapper ? Since this is not a block, as I understand it, there is no need to create a file and styles should simply be written at the beginning of main.scss ?
<head class="head">
<div class="block head__block"> </div>
</head>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question