I'm learning HTML/CSS, and I've seen some examples like using .text-center
for text-align: center;
(in Bootstrap3).
That is a little bit strange for me, because these classes' css style will never change, so I have to change their class when I need to change their style. For example, if I have to change an element with class="text-center"
to text-align: right;
, I'll change the class it uses to class="text-right"
instead of changing class text-center
's style.
Is there a detailed reason to use these fixed classes?
If so what is the general rule for using/not using fixed classes?