What Is Sass? Getting Started With Sass On A Mac
Sass is an extension for CSS3. It isn't an acronym, but a word. So, stop captitalizing it.
"Sass is for developers and CSS is for web browsers." - Hampton Catlin, creator of Sass. Sass makes writing old school CSS code easy for developers as it provides a lot of features that can be used to smoothen up the web designing and development process. Some of the prominent features are nested rules, variables, mixins, if/else statements, inheritence and more. And when you compile Sass using either a command line tool or web-framework plugin, you get well formatted CSS file.
Setting up Sass on Mac
Setting up Sass on Mac is pretty easy. Sass is build up using Ruby and you know what? Ruby comes pre-installed on Macs. So. all you have to do is:
- Go to terminal.app which is available in all macs.
- Type in terminal: gem install sass. And now you have sass installed on your mac.
- To check the version just type: sass --version.
Compiling Sass into CSS
All the files for Sass are saved in .scss format and if you want your sass code to compile in CSS file then follow these steps:
- Go to terminal.
- Type in terminal: cd "directory where your file is saved without quotes. for example: if saved in desktop then ~/Desktop "
- To compile .scss file into .css just type:: sass file.scss And a file.css will be generated in the same directory.
So you have it all. Start using Sass from today for your website and make your life easier.