Chapter 4. Nested Selectors and Modular CSS
In this chapter, you will learn the following topics:
- Using nested selectors
- Creating more intuitive code and making inheritance clear
- Referencing parent selectors with the & sign
- Using multiple & signs to refer to the parent selector more than once
- Using the & operator to change the selector order
- Utilizing the @extend directive
- Using placeholder selectors with the @extend directive
- Using the @extend directive together with the @media at-rule
- Using the @extend directive with care
- Emitting rules at the root of the document
- Avoiding nested selectors too deeply for more modular CSS
- Applying the OOCSS, SMACSS, and BEM methodologies