Reputation: 12352
I have a CSS like this:
.button-navigation-container button {
/*some properties*/
}
.button-navigation-container button.back-button,
.button-navigation-container button.cancel-button {
text-align: right;
padding-right: 2%;
}
But now I want to convert to LESS but I'm not sure which kind of selector should I use to get the back-button
and cancel-button
with the same style. Something like this:
.button-navigation-container button {
/*some properties*/
/*Selector for cancel-button and back-button ?*/{
text-align: right;
padding-right: 2%;
}
}
Should I use extend()?
Upvotes: 0
Views: 103
Reputation: 2328
.button-navigation-container {
button {
/*some properties for button*/
&.back-button, &.cancel-button {
text-align: right;
padding-right: 2%;
}
}
}
.button-navigation-container button {
/*some properties for button*/
}
.button-navigation-container button.back-button,
.button-navigation-container button.cancel-button {
text-align: right;
padding-right: 2%;
}
Upvotes: 1