Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
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 upRelated 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