- Sass and Compass Designer's Cookbook
- Bass Jobsen
- 215字
- 2021-07-16 10:56:47
Introduction
When coding Sass, you should realize that SCSS code compiles into valid CSS code. Sass does not guarantee that the CSS is modular, readable, or well-organized, and so easy to maintain. In this chapter, you will learn how to use nesting in your Sass code to reflect the visual hierarchy of your HTML and extend selectors to reduce the size of the compiled CSS code.
Also, the parent reference will be explained. You can use the & parent reference to use the parent selector in your code without having to explicitly use its name. The recipes in this chapter describe many useful use cases of the parent reference.
Sass does not generate bad code, but coders can. When you apply the Sass features described in this chapter, you should always keep the final result in your mind. For instance, nesting your code to follow the visual hierarchy of your HTML will make your code easier to read and maintain. On the other hand, nesting too deeply will produce overspecified CSS and will be considered to be a bad practice.
In the last recipe, you will learn about the Object-Oriented CSS (OOCSS), Scalable and Modular Architecture for CSS (SMACSS), and Block Element Modifier (BEM) methodologies. These methodologies can help you better organize your CSS code.
- Learning Cython Programming(Second Edition)
- AIRAndroid應(yīng)用開發(fā)實戰(zhàn)
- Python Deep Learning
- Python網(wǎng)絡(luò)爬蟲從入門到實踐(第2版)
- Java軟件開發(fā)基礎(chǔ)
- PySide 6/PyQt 6快速開發(fā)與實戰(zhàn)
- NGINX Cookbook
- Test-Driven Development with Django
- Java Web應(yīng)用開發(fā)項目教程
- Clojure for Java Developers
- Clojure Polymorphism
- XML程序設(shè)計(第二版)
- Java語言程序設(shè)計實用教程(第2版)
- 算法超簡單:趣味游戲帶你輕松入門與實踐
- Mastering XenApp?