Skip to Main Content
Sass and Compass in Action
book

Sass and Compass in Action

by Natalie Weizenbaum, Chris Eppstein, Brandon Mathis, Wynn Netherland
July 2013
Intermediate to advanced content levelIntermediate to advanced
240 pages
7h 5m
English
Manning Publications
Content preview from Sass and Compass in Action

Appendix C. The Sass syntaxes

C.1. Indented Sass versus SCSS

Most of this book demonstrates the SCSS syntax, which stands for Sassy CSS. SCSS is a superset of CSS, meaning that any valid CSS file is also a valid SCSS file. This means that you can change the CSS file screen.css to screen.scss and begin adding Sass features without needing to make any other changes. As a result, though the SCSS syntax is newer, it has become the most popular syntax for Sass.

Originally, Sass only had one syntax, called the indented syntax, or at that time, just Sass. To illustrate the differences between these syntaxes, we’ll look at the same code example written in each syntax.

First we’ll look at the SCSS syntax.

Listing C.1. SCSS syntax example
/* Compass ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Introducing Dart Sass: A Practical Introduction to the Replacement for Sass, Built on Dart

Introducing Dart Sass: A Practical Introduction to the Replacement for Sass, Built on Dart

Alex Libby
Mastering Sass

Mastering Sass

Luke Watts
Jump Start Sass

Jump Start Sass

Hugo Giraudel, Miriam Suzanne

Publisher Resources

ISBN: 9781617290145Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link