Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Sass gives us the option to compress and compact our style sheets to make our websites load faster. In this video, we'll go over the four CSS output styles.
Quick Reference
nested
sass --watch scss:css --style nested
The default output style. It reflects the structure of the CSS styles and the HTML document. Each property has its own line, and rules are indented based on how deep they're nested in the original Sass code.
expanded
sass --watch scss:css --style expanded
Similar to the nested style. It looks more like the CSS we'd write in a regular style sheet. Each property and rule takes up one line and properties are indented within the rules.
compressed
sass --watch scss:css --style compressed
Minifies our CSS output by stripping out comments and unnecessary spaces. It compresses CSS to one line. The most optimized output style – use before uploading your CSS to the server.
compact
sass --watch scss:css --style compact
Another optimized format that draws the focus to the CSS selectors instead of the properties. Each CSS rule takes up one line, with all properties defined on the same line.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
goshgarhuseynov
Front End Web Development Techdegree Student 10,873 PointsIs there a way to convert backwards from compressed mode to normal?
3 Answers
-
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,625 PointsSass/CSS output styles not working in console
2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up