T
T
TurboBlaster2018-12-07 17:45:31
HTML
TurboBlaster, 2018-12-07 17:45:31

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>

so far sketched out such code, but I would like to hear your comments.
And another question is how should I deal with the elements that I want to position
the layout for this picture, without a header with the company logo and menu.
Thanks in advance5c0a88e635da8903223209.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NaN, 2018-12-28
@KornevaViktoria

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 question

Ask a Question

731 491 924 answers to any question