Код: Выделить всё
Button
- button_color_primary
button_type_fill< /li>
button_type_outline - button_type_text
- button_type_fill
- button_type_outline
- button_type_text
- button_color_danger
button_type_fill - button_type_outline
- button_type_text
и так далее...
В scss я создал это
Код: Выделить всё
&_color_primary {
&.button_type_fill {
&:hover {}
&:focus {}
&:active {}
&:disabled {}
.button__text { }
.button__icon { }
}
&.button_type_outline {
&:hover {}
&:focus {}
&:active {}
&:disabled {}
.button__text { }
.button__icon { }
}
&.button_type_text {
&:hover {}
&:focus {}
&:active {}
&:disabled {}
.button__text { }
.button__icon { }
}
}
Я думаю, что это не очень хороший подход. Пожалуйста, поделитесь своими предложениями.
Подробнее здесь: https://stackoverflow.com/questions/787 ... ers-in-bem