Answer the question
In order to leave comments, you need to log in
How to properly organize nested blocks according to BEM?
Hello! I'm practicing BEM layout and in the course of my practice a few questions came up.
1) I did not find it in the documentation (it is possible that I was looking badly), about nested blocks. Did I manage to organize the project structure correctly? I'm interested in the info block, it is nested in the header block and I don't know if it should be in my header folder or should it be in the root of the project?
2) Each block should have its own file with markup, it turns out that in the end my index.pug file should consist of only includes?
3) Each bam block has its own style file, while in the markup the block is one class, i.e. should I have a bunch of style files consisting of one class??
4) Is it worth it, in my opinion, more clearly when the entire layout is in one file. I could still understand the splitting of styles if the division was in large structural blocks (header, section, footer, etc.), but it takes a lot of time to scatter each file into a separate folder.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question