Answer the question
In order to leave comments, you need to log in
In what situations is it justified to use utility classes (bootstrap)?
Bootstrap has many utility classes like .text-center
, .text-lowercase
, .w-100
, .border-0
and so on.
You can find out more here
The framework itself defines them as
classes with a single purpose to reduce the frequency of highly repetitive declarations.
.my-div
, because I need them, and the framework does not provide a utility class for them. And if it did, it would not be a bootstrap, but tachyons.class="my-div1 d-inline-block text-center text-uppercase w-100 font-italic py-3 my-3"
Answer the question
In order to leave comments, you need to log in
Let's say you have 2 such blocks on your page. One is centered, the other is left. In the case of your css, you will have to copy-paste the block completely and remove the text-align. In the case where there are many classes - just remove 1 class from the element.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question