Published: 20th Dec 2017 | Words: 586 | Reading Time: 3 minutes
The benefits of SASS
- A few of the key benefits of SASS are as follows:
- You can break up your CSS into small SASS files.
- You can use variables throughout your SASS code for consistent values for things like fonts and sizes.
- You can build blocks of CSS that you can use / inherit within other CSS rules.
- You can nest rules within one another and see exactly where things are.
- You can develop SASS files that with default styles you can use across projects.
- You can compile your CSS down to one file very easily.
- You can automatically remove empty rules.
- You can automatically remove comments.
- You can automatically combine similar CSS styles.
- You can automatically minify all your CSS so it’s the smallest size possible.
- If you structure your SASS properly you may never repeat yourself.
I worked with CSS for years to a point where I know nearly all the rules off by heart and fatter using SASS I could honestly I would never go back. All the features above lead to one simple thing, a much improved workflow. You can cut out a huge amount of time on a project by using SASS. SASS doesn’t make CSS better, it makes working with CSS better.
SASS, LESS, or something else
There are many variations of CSS pre-processors now. LESS is another language which is similar and you can build CSS through things like SASS both with and without braces which caters for people who build and understand code differently but want the same end result. Which language you use is up to you. The beauty of these languages is that no matter which one you use you can use the same philosophy of not repeating yourself and breaking up your code into manageable files.