Sass syntax provides the facility to nest one style inside another style.
Nesting is the process of placing code within other blocks of code.
Let us understand it with the help of an example.
Here see the HTML skelton, <h2>
and <p>
tag both is nested inside the div having class .container
.>
Let us understand it with the help of an example.
Sass Syntax:The above-nested style is also known as descendant selectors.
After compilation of the above Sass styles, the following CSS code will be obtained: