sass-@extend-directive

Sass | @extend and Inheritance

Sass @extend directive provides inheritance features. It can be used to inherit styles from other properties. Let us understand it with the help of an example.


After the transpiling of the above SCSS code, the out CSS code will be:

General Syntax

Try it yourself

Source Code

Try it yourself

Multiple Extends

You can use multiple @extend directives within a selector.

Multiple Extends

You can use multiple @extend directives within a selector.


Followings are the output CSS code after the transpiling of the above SCSS code.

General Syntax

Try it yourself

Source Code

Try it yourself