Answer the question
In order to leave comments, you need to log in
Which Bootstrap Grid Classes Should You Choose?
Recently I have been making up without frameworks, but now I decided to return to the bootstrap grid again. In connection with this, a question arose.
I adhere to the BEM methodology in layout, and adding bootstrap classes to the block in the html itself seems completely unreasonable, inappropriate, plus quite poor aesthetically.
<div class="class__element col-xs-12 col-sm-6 col-md-3"></div>
<div class="class__element"></div>
.class__element{
@extend .col-md-3;
@extend .col-sm-6;
@extend .col-xs-12;
}
Answer the question
In order to leave comments, you need to log in
The second way is more than reasonable.
Only perhaps you should think about using mixins instead of extending classes, and throwing out the grid altogether (well, here you need to evaluate the benefits received in a particular project).
.class__element {
@include make-sm-column(3);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question