Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
None of these approaches should be dogma. The most important thing is that the project should have just some kind of approach. Only then the project will be supported, there will be no chaos in it.
I use BEM-like class naming conventions, but otherwise I don't use it.
By the way, the list lacks MCSS.
Agree with @aen . There is another trick. Now microformats are gaining momentum. And for this reason, I try to use prefixes for general layout using classes.
I have my own approach to naming classes, which most often comes down to prefixes:
lt_ is the highest level of markup, such as containers for the header, footer, sidebar, main content, from layout
b_ is a block or block element (in the case when an element, I write b_block_name_element_name , like b_item_cnt or b_item_img)
m_ is a modifier for attaching additional styles to blocks or their elements
. On small and medium projects, this is enough for the eyes. In general, of all the considered methodologies, I liked MCSS the most, but I usually don’t need such a strict separation of layers.
See https://ru.bem.info/method/faq/#What-is-the-difference-BEM-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question