Chapter 2. Basic Sass syntax
This chapter covers
- Reusing colors, lengths, and other values with variables
- Adding structure to your CSS by nesting rules
- Writing maintainable stylesheets by distributing them among multiple files
- Reusing entire styles with mixins and inheritance
Sass’s SCSS syntax is a superset of the syntax of CSS3. This means that if can read and write CSS, you already know the basics of how to read and write Sass.
On top of CSS, Sass adds new features and new syntax that let you express more styles more clearly with less writing. Some Sass additions are designed to be easy to understand for people who understand CSS, even without having seen Sass before. Most of them require some explanation, though, which is what this ...
Get Sass and Compass in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.