Вы можете использовать @ extend в S CSS. Но не может расширять вложенные селекторы. Итак, вы не можете расширяться до .hero-text-box a
. Вы можете расширить это так:
Вход:
.hero-text-box {
color: #fff;
font-size: 1.6rem;
text-decoration: none;
}
.row-3 input {
@extend .hero-text-box;
color:red;
}
Выход:
.hero-text-box, .row-3 input {
color: #fff;
font-size: 1.6rem;
text-decoration: none;
}
.row-3 input {
color: red;
}
Или вы можете использовать @ mixin
Вход
@mixin myProperties {
color: #fff;
font-size: 1.6rem;
text-decoration: none;
}
.hero-text-box a {
@include myProperties;
}
.row-3 input {
@include myProperties;
color: red;
}
Выход:
.hero-text-box a {
color: #fff;
font-size: 1.6rem;
text-decoration: none;
}
.row-3 input {
color: #fff;
font-size: 1.6rem;
text-decoration: none;
color: red;
}