文章目录
  1. 1. 安装ruby
  2. 2. sass
    1. 2.1. 安装sass
    2. 2.2. sass使用
  3. 3. compass
    1. 3.1. 安装compass
    2. 3.2. compass使用

sass写css

安装ruby

install ruby
sudo apt-get install ruby

sass

安装sass

gem install sass
出现ERROR: Could not find a valid gem时的处理方法
更改镜像
$ gem sources –remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES ***

https://ruby.taobao.org

sudo gem install sass

sass使用

1
sass _bootstrap.scss bootstrap.scss

compass

安装compass

gem install compass

compass使用

初始化项目

1
compass create myproject

编译

1
compass compile

ref
http://www.ruanyifeng.com/blog/2012/06/sass.html
http://my.oschina.net/sunshinewyf/blog/513235

文章目录
  1. 1. 安装ruby
  2. 2. sass
    1. 2.1. 安装sass
    2. 2.2. sass使用
  3. 3. compass
    1. 3.1. 安装compass
    2. 3.2. compass使用
Fork me on GitHub