Answer the question
In order to leave comments, you need to log in
What makes a tag with two block classes global and its own?
What is a "global" and "native" class, does it have to do with modifiers in any way?
Answer the question
In order to leave comments, you need to log in
If I correctly understood the context of the classes in your question, then it turns out that
<div class="title title--color__red"></div>
<div class="title title--color__green"></div>
<div class="title title--color__black"></div>
// .title- глобальный класс. Можно задать общие стили для группы элементов, чтобы их не дублировать
.title {
text-align: center;
color: black;
font-size: 16px;
}
// собственные классы. Дополнительные (индивидуальные) стили
.title .title--color__red {
color: red;
}
.title .title--color__green {
color: green;
font-size: 14px; // Переопределили стиль глобального класса
}
.title .title--color__red {
color: blue;
text-decoration: underline;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question