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, Real World example

I kind of get what Sass is, but could someone explain a real world example of how you would use it?

4 Answers

Andre' Jones
Andre' Jones
26,671 Points

Sass is CSS just with built in features to make writing it faster. Im not sure what u mean by real world example, but its just CSS. Example - Zurb Foundation is a CSS framework built on SASS. Learn CSS write it alot of it then learn Sass and u'll appreciate what it offers.

oh okay, thank you, I Thought it was a separate thing, like you would have a CSS file and a Sass file

Andre' Jones
Andre' Jones
26,671 Points

nah once u write sass it will be compiled and it will turn into scss automagically

Andre' Jones
Andre' Jones
26,671 Points

once u write sass it will turn into css automagically

thanks!

In my opinion, sass is a more usable tool, as it has a more conventional approach for a developper. CSS is quite time-eater, where sass can re-use your previous code, nest, write functions and variables, etc... It can become quite handy, especially if you are familiar with other codes. Plain CSS is still usable, that's why it's quite confortable for beginners. (sorry for my english, not my mother tongue).

Thank you Giovanni!

You're welcome :). A simple example I could give you, is to create a navbar, a responsive one :). Do it with a pure css code, and then try it with Sass, and then with Foundation (you can learn from the new Framework basics course), it uses Sass (or if you prefer Less, you can use Bootstrap, which is also taught in the Framework basics course). It's a perfect (and easier) way to see what you can do with Sass, a lot quicker than with pure CSS. Give us a reply when you do, we can learn from your experience ^^.

Thank you Giovanni, I will once Im ready to get to that! thanks again!