Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Sass Basics (retired) Variables, Mixins, and Extending Selectors The Power of Mixins

What's the point in learning Sass?

Sass seems pretty pointless to me. Spending all this time learning Sass in order to save time and cut corners with CSS seems like a bit of a trade off that doesn't warrant my time and effort; KISS (keep it simple stupid) is better than DRY (don't repeat yourself).

8 Answers

John Burkhard
John Burkhard
16,314 Points

Don't discredit the DRY method, it's the basis behind all programming concepts.

KISS isn't a methodology, it's an excuse.

As for why you should learn SASS or any other preprocessor, take a minute to read this article:

http://alistapart.com/article/why-sass

It's not about cutting corners, it's about being efficient. Saving time is paramount especially when working in a team environment. As the web evolves along with its numerous frameworks (ZURB Foundation), preprocessors are going to be more and more in demand.

Colin Bell
Colin Bell
29,679 Points

I changed your comment to an answer. And it's a good one.

Sean Do
Sean Do
11,933 Points

It's a personal choice to know SASS. SASS is very powerful language for CSS users to write code in a short amount of time and not worrying about ";" or "{}". One mistyped ";" or "{}" is basically "GG" in a huge stylesheet. Over the years, CSS users desired for variables, because remembering the specific color-value or project design is a pain in the butt. When the project design changes, you don't have to go scouting your code to change the color-value. Don't Repeat Yourself (DRY), you find yourself reusing the same set of codes in your projects. There's always one set you'll remember and reuse.

Marco Slooten
Marco Slooten
7,899 Points

Like mentioned before, Sass makes maintenance on CSS more efficient. I've had websites in the past with huge stylesheets. Brand colors were all over the place, the same shade of blue might appear ten times or more. Also there was a system behind padding/margin for consistent whitespace. It is incredibly hard and time consuming to make changes to projects like that using plain CSS. I might have a margin of 10px defined in as much as twenty selectors. I might also have a margin on some other elements that is twice that, 20px, and should be related to the previous margin (always double). In Sass it's a breeze; you define this base margin once, and simple multiply that for the 20px. If you want to change this base margin to 15px, you have to change it in one place and everything else follows logically.

Another point that isn't mentioned yet, is that a lot of jobs openings call for knowledge in Sass or LESS. So if you're doing these courses to increase your job opportunities, it can be sensible to learn Sass. It might just improve your chances.

I suppose looking at something from an outside perspective would skew my thoughts on something such as Sass. When I am in work as a website developer I guess I will know.

I think we are on subjective waters up to this point. It is not an obligation to learn Sass or to appreciated, just let it sit in the back of your brain and when you get involved in a big project, with lots of long StyleSheets, evaluate it again.

Jaime Rios
PLUS
Jaime Rios
Courses Plus Student 21,100 Points

Adding to the previous responses it makes it more functional, for example, being able to treat mixins like functions with arguements makes it easier to code.

Michael Plemmons
Michael Plemmons
9,393 Points

I had this in mind, that's why I read this forum. After hearing other people's explanation. I can see now why sass would be important to learn. Until I become better at CSS, I'm going to just take notes on this course and probably not practice it too much yet, but keep it in the back of my brain like Jessica suggested and if I need to condense my code down or learn it for business practices, I can pick it back up.

Jaime Rios
Jaime Rios
Courses Plus Student 21,100 Points

I took a different aproach. I just learned how to compile sass into css and then started using it.

Harry Beckwith
Harry Beckwith
13,452 Points

Yup sass is awesome. I can already see how beneficial it would be to use sass within a project. Most websites have a colour scheme in place, if the client changes their mind on this color, using variables such as $primary-color: #363; would save a HUGE amount of time for future changes as the colour only needs to be changed in one place. Sass is pretty powerful, consider the @mixin and @include, this combined with a similar use as functions were math can be applied, is an incredible skill to know.

From what I've learned up to now, it just makes your website even more complex and complicated and adds a ton of extra messy code that is hard to read and even harder to understand. Can't we just wait for the next version of CSS instead of creating our own hacks and patches and expecting everyone to keep pace and learn every little nuance of yet another computer language?

John Burkhard
John Burkhard
16,314 Points

It's not a hack or a patch, sorry. You obviously didn't read the article. It also doesn't add any extra messy code to your site at all. It compiles to clean CSS that the site loads normally. The next version of CSS won't necessarily even have the major features of SASS/LESS much less be adopted across the industry as a standard for quite some time. Part of being in this industry is that we are constantly learning, adapting, discovering and being creative with the tools that we have at our disposal.

Nobody is forcing you to learn or use a preprocessor like SASS, but it won't hurt.

Colin Bell
Colin Bell
29,679 Points

It only adds of ton of extra messy code if it's written improperly and haphazardly.