程序员

Sass系列(二):sass的基本用法

2017-04-29  本文已影响44人  luichooy

sass的语法格式

sass有两种语法格式:

eg:
$color:#333
body
  font-size:14px
  color:$color
eg:
$color:#333;
body{
  font-size:14px;
  color:$color;
}

sass编译

sass命令行编译

sass图形化工具编译

  1. Koala (http://koala-app.com/)
  2. Compass.app(http://compass.kkbox.com/
  3. Scout(http://mhs.github.io/scout-app/
  4. CodeKit(https://incident57.com/codekit/index.html
  5. Prepros(https://prepros.io/

SASS提供四个编译风格的选项:

// 用法示例:在编译命令后面带上 `-- style *`参数
sass --watch test.scss:test.css --style nested
上一篇 下一篇

猜你喜欢

热点阅读