Compass: CSS Stylesheet Framework
Compass is a stylesheet authoring framework that makes your stylesheets and markup easier to build and maintain. With compass, you write your stylesheets in Sass instead of CSS. Using the power of Sass Mixins and the Compass community, you can apply battle-tested styles from frameworks like Blueprint to your stylesheets instead of your markup.
It’s a Ruby on Rails project. You run a CLI utility that watches a directory where your .css and .sass reside. The changes you make to your .sass files get automatically parsed and translated to .css files. The .sass format allows you to have a simplified less repetitive stylesheet markup, in addition to the ability to use variables, functions, mathematic operations, and more.
- In CSS, ever wished you could store the color palette for your site design in a few variables and then just reference those variables through the stylesheet?
- Ever wished you could perform cross-browser compatible mathematical addition on layout column widths?
- Ever wished you could easily gather a library of commonly used CSS, and then selectively include them in your various designs with a single line?
Now you can, with Compass.
Installation on Debian/Ubuntu 9.10 Karmic is like:
sudo aptitude install ruby gem; # dependencies sudo gem sources --add http://gems.github.com/ sudo gem install chriseppstein-compass; # install sudo gem install chriseppstein-compass-960-plugin; #optional plugin compass -f blueprint project; # example usage compass -r ninesixty -f 960 project; # example plugin usage
Looks promising! See more detailed Compass install instructions.
UPDATE: Since I posted this, I realized that using the Ubuntu/debian package management system (Aptitude) to try to install Ruby and Rubygems is a huge hassle and ultimately will not work. Now I use RVM. Like so for Ubuntu 10.04 64-bit server:
# installing rvm # see also: http://rohitarondekar.com/articles/installing-rails3-beta3-on-ubuntu-using-rvm sudo aptitude install curl git-core bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) sed -i 's/^\[/# [/' ~/.bashrc echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc source ~/.bashrc # dependencies for compiling Ruby sudo apt-get install curl bison build-essential autoconf zlib1g-dev libssl-dev libxml2-dev libreadline6-dev # dependencies for compiling my RubyGems gems sudo aptitude install libpq-dev libmysql-ruby libmysqlclient-dev sqlite3 libsqlite3-dev libxslt-dev libxml2-dev imagemagick # openssl package for RVM rvm package install openssl # readline package for RVM rvm package install readline # installing ruby rvm install 1.9.2 -C --with-openssl-dir=$rvm_path/usr,--with-readline-dir=$rvm_path/usr sudo -i echo "gem: --no-ri --no-rdoc" >> /etc/gemrc rvm use 1.9.2 --default sudo ln -s `which ruby` /usr/bin/ruby1.9.2
This will get you on edge Rails and Ruby. Then from there its as simple as:
gem install compass compass watch
‘
And I no longer use 960gs. I prefer Susy now.
Hope this helps!
