sass extend example - JSFiddle
HTML
<div class="header">
<h4 class="header-4">this is a header</h4>
<span class="text">this is a span</span>
</div>
SCSS
// CSG
.header-4 {
color: red;
font-size: 1.2rem;
font-weight: 100;
}
// if somebody decides to make the text same as header-4 by extending header-4
.text {
@extend .header-4;
}
// And then somebody else decides to tweak the color just for the header-4 in this case by selecting and styling as below
// uncomment to see unexpected changes
.header .header-4 {
//color: blue;
}
// So using mixin or classes directly is better to avoid this issue