O'Reilly logo

Pragmatic Guide to Sass by Michael Lintorn Catlin, Hampton Catlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3Using Sass with Rails

Sass was originally built to work with Rails, and it’s painfully easy to use with the popular Ruby web framework. If you don’t use Rails, then move on to the next chapter, where we’ll show you an easy way to work with Sass files on your computer. The only difficult part is dealing with the slight differences between Rails versions. But read on, brave reader, and we’ll get you sorted out.

If you are using a Rails version previous to 3.0, then all you need to do to get Sass working with your Rails application is to add config.gem ’sass’ to your environment.rb file. If you place your Sass files inside of public/stylesheets/sass/ (yes, make sure to make the directory!), then they will automatically get compiled to CSS in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required