Sass makes CSS fun again

Sass makes CSS fun again

Posted: Wednesday 10.07.2013 CET Facebook Google+

Sass is an extension of CSS3, adding nested rulesvariables,mixinsselector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. Sass has two syntaxes. The most commonly used syntax is known as “SCSS” (for “Sassy CSS”), and is a superset of CSS3’s syntax. This means that every valid CSS3 stylesheet is valid SCSS as well. SCSS files use the extension .scss.

The second, older syntax is known as the indented syntax (or just “.sass”). Inspired by Haml’s terseness, it’s intended for people who prefer conciseness over similarity to CSS. Instead of brackets and semicolons, it uses the indentation of lines to specify blocks. Files in the indented syntax use the extension .sass.

While the documentation on this site is mostly in the SCSS syntax, both syntaxes are fully supported – there is no functional difference between them. Use the syntax you prefer.

Finally, if you want to look at the Sass implementation, check out the YARD API documentation. This probably won’t be too useful for most people, but if you’re writing Ruby code to interact with Sass, that’s a good place to look.

Last updated 13. August 2014 12:04 CET

You May Also Like