Answer the question
In order to leave comments, you need to log in
BEM + bootstrap layout, right?
Good afternoon, I started studying the BEM methodology and I want to make up on a clean bem + bootstrap (here I pulled out sass mixins for row + container and col)>
<div class="caseStudy caseStudy--chevant">
<div class="caseStudy__header caseStudy__header--chevant">header ------bootsrap container , стили с него
<div class="caseStudy-content"> ------bootsrap row, стили с него
<div class="caseStudy-info"> ------bootsrap col, стили с него
<div class="caseStudy__logo caseStudy__logo--chevant">
<img src="" alt="">
</div>
<div class="caseStudy__subTitle caseStudy__subTitle--chevant">
<div class="caseStudy__title caseStudy__title--chevant"></div>
</div>
<div class="caseStudy__disc caseStudy__disc--chevant">
</div>
</div>
<div class="caseStudy-picture"> ------bootsrap col, стили с него
<img src="" alt="">
</div>
</div>
</div>
<div class="caseStudy__body caseStudy__body--chevant">body</div>
<div class="caseStudy__footer caseStudy__footer--chevant">footer</div>
</div>
Answer the question
In order to leave comments, you need to log in
bootstrap styles (that is, classes) are best left as they really are, otherwise you can get confused or forgotten later, or another person will work on the project, and you most likely extend them into your classes simply, this is not obvious and can cause problems. It's okay that you will have bootstrap styles not by bem, but yours by bem.
If you need to somehow customize the styles of the bootstrap classes, just add your class in addition to it and override the styles for it
. camelCase in the styles is strange to see, it’s better to remember it with a hyphen, this is a bad practice, since it can be confused with id for js, that is, it’s hard to read the code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question