- 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.
- Objective-C Memory Management Essentials
- Python入門(mén)很簡(jiǎn)單
- Visual Basic程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo)(第二版)
- iOS開(kāi)發(fā)實(shí)戰(zhàn):從入門(mén)到上架App Store(第2版) (移動(dòng)開(kāi)發(fā)叢書(shū))
- Building Microservices with .NET Core
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- Buildbox 2.x Game Development
- Kubernetes進(jìn)階實(shí)戰(zhàn)
- Mudbox 2013 Cookbook
- 零基礎(chǔ)學(xué)編程系列(全5冊(cè))
- Java Web應(yīng)用開(kāi)發(fā)
- 樹(shù)莓派開(kāi)發(fā)從零開(kāi)始學(xué):超好玩的智能小硬件制作書(shū)
- Pandas入門(mén)與實(shí)戰(zhàn)應(yīng)用:基于Python的數(shù)據(jù)分析與處理
- 流程讓管理更高效:流程管理全套方案制作、設(shè)計(jì)與優(yōu)化
- Test-Driven Java Development(Second Edition)