HOSTING : Sass/Compass

It will help you to develop with fun.

Update Ruby

Open the black screen.(Terminal)

sudo su

enter your password...and execute the following lines to upgrade your system

gem update --system
exit 

Install Sass

SASS/SCSS is a meta language. 
http://sass-lang.com/ 

sudo gem install sass
update : $ sudo gem update sass

Install Compass 

Compass compiles SASS/SCSS files and offers a CSS3 framework.
http://compass-style.org/ 

sudo gem install compass
update : $ sudo gem update compass

Setup a new project

open the desired project

cd <to your folder project>
compass init

...

Structure

project
|_index.php
|_sass
    |_style.scss
    |_partials
        |_partial.scss
    |_modules
    |_css
        |_style.css 
|_config.rb

 Config.rb

Example :

# Require any additional compass plugins here.
 
# Set this to the root of your project when deployed:
http_path = "../"
css_dir = "../css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
 
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
 
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
 
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
 
 
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass

 

Setup an existing project

Update Ruby/Compass/Sass. Then go to the existing project dir

 

cd <to an existing folder project>

Make sure that a config.rb file exists.

Launch 

compass watch

and pray (sourire)

Generate CSS

To detect changes in your SASS/SCSS files and generate automatically CSS files. Execute into the terminal :

compass watch

Terminal displays:

>>> Compass is polling for changes. Press Ctrl-C to Stop.

Press Ctrl-C to leave...

You can although launch the compilation manually when needed.

compass compile