-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse parent style with &
#2734
Comments
Please note the issue tracker is not a support forum or a sort of, and it's primarily meant only for issue/bug reports (as well as feature requests). For "How-To"/"Can-I" questions please use SO. As for the question itself, no, it is not possible (there're proposed #2101 and #2200 - so eventually you could use .my-btn {
&--raised, &--raised--white {
&:extend(.btn, .btn-raised);
&:hover:extend(.btn:hover, .btn-raised:hover) {}
}
&--raised--white {background-color: #fff}
} Or move duplicated stuff to a "normal" mixin: .my-btn {
&--raised {
.raised-button();
}
&--raised--white {
.raised-button();
background-color: #fff;
}
}
.raised-button() {
&:extend(.btn, .btn-raised);
&:hover:extend(.btn:hover, .btn-raised:hover) {}
} Both methods are actually same clear and effective. |
Merging to #2200. |
Thanks a lot. |
This is possible with Less?
The text was updated successfully, but these errors were encountered: