Sass @extend Rules
You are Here:
Sass @extend Rules
@extent
allows you to inherit the styles of one selector to the another.
@extend inside Parent Selector
Example
SASS TO CSS CONVERTER
.error {
border: 1px #f00;
background-color: red;
&-serious {
@extend .error;
border-width: 3px;
}
}
Syntax
@extend className;
@extend inside Another Selector
Example
SASS TO CSS CONVERTER
.error:hover {
background-color: red;
}
.error-serious {
@extend .error;
border-width: 3px;
}
Reminder
Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in Sass.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.