Reusing styles in SASS/SCSS without merging selectors
%some-css {
//CSS goes here.
}
.another-class {
@extend %some-css;
}
Could you use a @mixin?
// Define here
@mixin generic-error {
// Error styling
}
// Replace original
.notification {
&.error {
@include generic-error;
}
}