Right now I have a class that I'm @extend
-ing to all button
elements. However, I would like to not extend it to one single button and would prefer not to resort to changing the HTML to make it a link.
Is there any way to remove the @extend
for a particular rule in SASS?
No. Your options are:
- Don't style all buttons (use classes or more specific selectors to avoid your unique element)
- Override the styles of the unique element (depending on the styles used, it can be very difficult to return a button to its default appearance for every browser)
The least painful solution for you would be to use the :not selector:
// style all buttons, except for ones with the "default" class on them
button:not(.default) { %extend theStyles }