sass Extend / Inheritance Extend a Class


Example

.message
  color: white

.message-important
  @extend .message
  background-color: red

This will take all of the styles from .message and add them to .message-important. It generates the following CSS:

.message, .message-important {
  color: white;
}

.message-important {
  background-color: red;
}