Skip to content
On this page

选择器

缩进

Stylus 采用"Python 风格"(即基于缩进)。空格是有意义的,因此我们用_缩进_和_减少缩进_来替代 {},如下所示:

stylus
body
  color white
body
  color white

编译后的结果是:

css
body {
  color: #fff;
}
body {
  color: #fff;
}

如果你更喜欢,可以使用冒号来分隔属性和值:

stylus
body
  color: white
body
  color: white

Released under the MIT License.