Skip to content

Instantly share code, notes, and snippets.

@nathansmith
Created August 29, 2011 21:00
Show Gist options
  • Star 69 You must be signed in to star a gist
  • Fork 28 You must be signed in to fork a gist
  • Save nathansmith/1179395 to your computer and use it in GitHub Desktop.
Save nathansmith/1179395 to your computer and use it in GitHub Desktop.
Example config.rb file for Compass
preferred_syntax = :sass
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
line_comments = true
# output_style = :compressed
@wesruv
Copy link

wesruv commented Oct 22, 2013

This is great, I've been hunting for an example file for so long! Can't believe the Compass docs don't have more

@EliasTouil
Copy link

Thanks !

@patrick-wc
Copy link

Thanks!

@careyestes
Copy link

Thank you

@daniel-gg
Copy link

what about haml integration with compass, couold you post some simple exmaple?

@nueverest
Copy link

Here is a link for those interested in all of the settable config.rb options:
http://compass-style.org/help/tutorials/configuration-reference/

@peteobrien
Copy link

BTW Compass will generate a config file for you when you 'compass create YourProject'

@josephrexme
Copy link

Would have been nice if you included a commented require = extension since that is not usually generated with compass create

@joelbyrd
Copy link

How do you turn on the --trace option? Would this be done in the config.rb file, and if so, how exactly?

@pillarcreation
Copy link

You can do it from the Command Prompt, say when you type

compass watch

or

compass compile

Just add...

compass compile --trace

to the tail

@CassyJens
Copy link

It looks like the above link for config.rb options no longer exists. Here is an updated URL: http://compass-style.org/help/documentation/configuration-reference/

@kiranu
Copy link

kiranu commented Mar 12, 2015

sass_path = File.dirname(FILE)
css_path = File.join(File.dirname(FILE), "..", "css")
environment = :development
output_style = :compressed

@asilvino
Copy link

asilvino commented Sep 3, 2015

thanks man! that was reallllyyy helpfull!

@brandonsueur
Copy link

Thanks!

@Sangeethaself
Copy link

Thanks

@zerefdev
Copy link

zerefdev commented Oct 3, 2017

Thanks

@dupls
Copy link

dupls commented May 30, 2018

I would rather suggest that you have this file created automatically. From the terminal in your theme folder run compass init. When the config.rb file is created, you can open and check your paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment