July 2016
Intermediate to advanced
130 pages
2h 11m
English
| 5 | CSS 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 ... |