Answer the question
In order to leave comments, you need to log in
How to get rid of copypasta?
In general, I have a lot of similar pages: Header, sub-header, text, sections
For the typography, I created the following classes:
.l-about-typography {
&-title {
font-size: 32px;
font-weight: bold;
line-height: 1.38;
color: #1e2736;
@media (max-width: 767px) {
font-size: 28px;
line-height: 1.2;
}
}
&-sub-title {
font-size: 20px;
font-weight: bold;
line-height: 1.3;
color: #1e2736;
@media (max-width: 767px) {
font-size: 18px;
}
}
&-text {
font-size: 16px;
line-height: 1.75;
color: #424447;
a {
display: inline;
color: #3f89ea;
&:hover {
text-decoration: underline;
}
}
}
}
<h1 class="hist__main-title l-about-typography-title">Текст</h1>
<h4 class="hist__sub-title l-about-typography-sub-title"></h4>
<p class="hist__text l-about-typography-text"></p>
<h1 class="politika__main-title l-about-typography-title">Текст</h1>
<h4 class="politika__sub-title l-about-typography-sub-title"></h4>
<p class="politika__text l-about-typography-text"></p>
.hist {
&__main-title {
margin-bottom: 40px;
}
&__section {
&:not(&:last-child) {
margin-bottom: 40px;
}
}
&__sub-title {
margin-bottom: 20px;
&--mt-top {
margin-top: 20px;
}
}
&__text {
&:not(&:last-child) {
margin-bottom: 10px;
}
}
}
.politika {
&__main-title {
margin-bottom: 40px;
}
&__section {
&:not(&:last-child) {
margin-bottom: 40px;
}
}
&__sub-title {
margin-bottom: 20px;
&--mt-top {
margin-top: 20px;
}
}
&__text {
&:not(&:last-child) {
margin-bottom: 10px;
}
}
}
Answer the question
In order to leave comments, you need to log in
Mixes are needed in order to make adjustments to a specific block, if such adjustments are repeated in different blocks, then this is a modifier
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question