There are often cases when designing a page when one class should have all the styles of another class, as well as its own specific styles. The most common way of handling this is to use both the more general class and the more specific class in the HTML.
@extend directive avoids these problems by telling Sass that one selector should inherit the styles of another selector. For example:
For more information and examples as to how the
@extend directive works, be sure to read Sass Extends: be aware of the loop.