Stylus基本使用

Stylus [ˈstaɪləs] CSS预处理语言

  1. 安装到全局环境
$ npm install stylus -g
复制代码
  1. 基本使用
stylus -w style.styl -o style.css
复制代码

3. Example

border-radius()
        -webkit-border-radius: arguments
        -moz-border-radius: arguments
        border-radius: arguments
 
    body a
        font: 12px/1.4 "Lucida Grande", Arial, sans-serif
        background: black
        color: #ccc
 
    form input
        padding: 5px
        border: 1px solid
        border-radius: 5px
复制代码

compiles to:css

body a {
        font: 12px/1.4 "Lucida Grande", Arial, sans-serif;
        background: #000;
        color: #ccc;
     }
    form input {
        padding: 5px;
        border: 1px solid;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
    }
复制代码

学习地址:Stylus中文版参考文档web

相关文章
相关标签/搜索