Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Up and running with installing SASS on OSX 10.8 Mountain Lion

September 28, 2013 Leave a Comment

Up and running with installing Sass on OSX

sass on osx 10.8

SASS  (Syntactically Awesome Stylesheets) is a CSS pre-processor tool in which you write your CSS code using variables, selector inheritance, mixins, and nestings and  and then compile that code to spit out regular CSS. The benefits of SASS are more advantageous in a mid-large web development project with multi user input, it manages the code base by enabling the code structure to modular and tidy with reusable elements.

Working in SASS helps to make the code updating process easier as when you need to change the CSS code you just change your initial variables which in turn then change every instance of that variable in the entire CSS. Not only that, but the initial coding in SASS is quicker like a shorthand version which when output to regular CSS outputs the longhand version.

You code to a .scss format first and then compile to a regular .css file, here is an introductory guide to working with SASS.

SASS runs on the programming language Ruby, which on modern versions of OSX or Linux is easy as it comes bundled with the OS, on Windows you need to install Ruby separately.

Check if you have Ruby

ruby -v

Your output should be similar to

ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

If you need the latest Ruby version or are getting Ruby errors you can install the latest version.

Install SASS

sudo gem install sass

Check SASS version

sass -v

Your output should be similar to

Sass 3.2.12 (Media Mark)

Dependency

Add in a dependency package for converting files to CSS when watching a directory – explained further down…

gem install --version '~> 0.9' rb-fsevent

Compiling SASS to CSS

To compile a .scss file into a regular .css file there are 2 ways, static or dynamic:

Static

Single file

sass --update cssfilename.scss

or directory containing multiple files:

sass --update /directory/

Which will produce your new cssfilename.css file.

Dynamic

This will watch a file or directory and as long as the command is running in the Terminal will automatically save to the .css files as soon as you save the .scss files.
This operation needed the dependency from earlier.

Watch a single file

sass --watch sass cssfilename.scss
>>> Sass is watching for changes. Press Ctrl-C to stop.

or directory containing multiple files:

sass --watch /directory/
>>> Sass is watching for changes. Press Ctrl-C to stop.

When you are finished editing the .scss files cancel the Terminal command by hitting ‘control’+’c’.

Updating SASS

To upgrade to the latest version of SASS, run

sudo gem update sass

Cats: CSS

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • Google hits back after Apple exec says AI is hurting search
  • Apple: “Hundreds of millions to billions” lost without App Store commissions
  • Matter update may finally take the tedium out of setting up your smart home
  • Cue: Apple will add AI search in mobile Safari, challenging Google
  • Apps like Kindle are already taking advantage of court-mandated iOS App Store changes

RSS mac surfer

  • Tot is new text editor for Mac, iPhone, and iPad focused on constraints and ease of use
  • TiPbITS: Google Drive Sorting Can Hide New Documents
  • How to take a screenshot on a MacBook Pro
  • How To Create Simple Animation With Mac Keynote
  • Last Week on My Mac: Virus pandemics

Donate

Copyright © 2025· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2025 · gee on Genesis Framework · WordPress · Log in