Skip to Content
Pragmatic Guide to Sass 3
book

Pragmatic Guide to Sass 3

by Hampton Lintorn Catlin, Michael Lintorn Catlin
July 2016
Intermediate to advanced
130 pages
2h 11m
English
Pragmatic Bookshelf
Content preview from Pragmatic Guide to Sass 3
5CSS Output Styles

When you compile your Sass, a CSS file is generated. But what if you want that CSS file to be in a different format? If you compile your Sass on the command line, you have a few options to choose from. This means you can have your CSS output in a style that you prefer.

If you installed the Ruby version of Sass, in the command line, you can type this:

 sass --style

If you installed the Node version of Sass, you can type this instead:

 node-sass --output-style

Follow this with the name of the style you want. The four options you can choose from are called nested, expanded, compact, and compressed. For example, here’s how you would use the Ruby version of Sass to output a compressed file:

 sass --style compressed input.scss ...
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

Jump Start Sass

Jump Start Sass

Hugo Giraudel, Miriam Suzanne
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
Mastering Sass

Mastering Sass

Luke Watts

Publisher Resources

ISBN: 9781680502060Errata Page