As discussed in the Creating more intuitive code and making inheritance clear recipe of this chapter too, you should avoid nesting selectors too deeply. The risk of nesting too deep is creating an overspecified CSS, which is not easy to maintain. In this recipe, you will learn how to prevent nesting your selectors to deep.
You can use the Ruby Sass compiler to compile the Sass code in this recipe into CSS code. Read the Installing Sass for command line usage recipe of Chapter 1, Getting Started with Sass, to find out how to install Ruby Sass. The scss-lint
tool, as described in the Writing your code in a text editor recipe of Chapter 1, Getting Started with Sass, will be used to check your SCSS code for nesting problems.