- 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.
- 新編Visual Basic程序設(shè)計(jì)上機(jī)實(shí)驗(yàn)教程
- C++ Primer習(xí)題集(第5版)
- Learning Cython Programming(Second Edition)
- 零基礎(chǔ)PHP學(xué)習(xí)筆記
- Learning Spring 5.0
- Java從入門到精通(第4版)
- QGIS:Becoming a GIS Power User
- Learning Zurb Foundation
- 零基礎(chǔ)趣學(xué)C語言
- OpenResty完全開發(fā)指南:構(gòu)建百萬級別并發(fā)的Web應(yīng)用
- QGIS 2 Cookbook
- JavaScript從入門到精通(視頻實(shí)戰(zhàn)版)
- Three.js權(quán)威指南:在網(wǎng)頁上創(chuàng)建3D圖形和動畫的方法與實(shí)踐(原書第4版)
- Android嵌入式系統(tǒng)程序開發(fā)(基于Cortex-A8)
- JavaEE架構(gòu)與程序設(shè)計(jì)