Sass Nested Rules
Sass Nested Rules
Rather than repeating the same selectors over and over again, you can write one style rules inside another. Sass will automatically combine the outer rule's selector with the inner rule's.
Sass Nested Rules is a backbone of sass.
The following example will demonstrate how to apply Sass nested rules.
Example
Syntax
Applying Nested Rules for List
Example
Applying Nested Rules for @media
Example
Tips
The deeper you nest, the more bandwidth it takes to serve your CSS and the more work it takes the browser to render it. So, it is recommended to keep those selectors shallow whenever possible.
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.