Stylus

为nodejs构建的表现强大、功能丰富的CSS语言。(Expressive, robust, feature-rich CSS language built for nodejs.)

Github星跟蹤圖

Stylus 是一种革命性的新语言,提供了一种高效,动态和表达的方式来生成CSS。 支持缩进语法和常规CSS样式。

安装
$ npm install stylus -g
基本用法
从命令行观察并编译 Stylus 文件
stylus -w style.styl -o style.css

您还可以 尝试 在 stylus-lang.com 上的所有 Stylus 功能,使用 Stylus 在 codepen 上创建一些东西,或者使用 gulp-stylusgulp-accord 将 Stylus 与 gulp 集成在一起.。

特性
Stylus 有很多功能。 详细的文档链接如下:
  • css语法支持
  • 混入
  • 关键字参数
  • 变量
  • 插值
  • 算术,逻辑和等式运算符
  • 导入其他触控笔
  • 内省api
  • 型强制
  • @延伸
  • 条件语句
  • 迭代
  • 嵌套选择器
  • 父参考
  • 语言功能
  • 可变参数
  • 内置功能(超过60)
  • 可选图像内联
  • 可选压缩
  • JavaScript API
  • 非常简洁的语法
  • 手写笔可执行文件
  • 错误报告
  • 单行和多行评论
  • css文字
  • 字符转义
  • @keyframes支持和扩展
  • @ font-face支持
  • @media支持
  • 连接中间件
  • TextMate包
  • Coda /SubEtha编辑语法模式
  • gedit语言规范
  • VIM语法
  • Espresso Sugar
  • Firebug扩展
  • 用于编写stylus的 heroku web service
  • 风格指导解析器和发生器
  • 透明的供应商特定功能扩展

概覽

名稱與所有者stylus/stylus
主編程語言JavaScript
編程語言Makefile (語言數: 5)
平台
許可證MIT License
發布數174
最新版本名稱0.63.0 (發布於 )
第一版名稱0.0.2 (發布於 )
創建於2010-12-28 22:11:43
推送於2024-04-25 05:29:09
最后一次提交2020-07-16 15:01:28
星數11.2k
關注者數341
派生數1.1k
提交數4.1k
已啟用問題?
問題數2039
打開的問題數246
拉請求數539
打開的拉請求數20
關閉的拉請求數199
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Stylus

Build Status
npm version
npm
Join the community on Spectrum

Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS. Supporting both an indented syntax and regular CSS style.

Installation

$ npm install stylus -g

Basic Usage

Watch and compile a stylus file from command line with

stylus -w style.styl -o style.css

You can also try all stylus features on stylus-lang.com, build something with stylus on codepen or integrate stylus with gulp using gulp-stylus or gulp-accord.

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:

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;
}

the following is equivalent to the indented version of Stylus source, using the CSS syntax instead:

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;
}

Features

Stylus has many features. Detailed documentation links follow:

Community modules

Framework Support

CMS Support

Screencasts

Authors

More Information

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

(The MIT License)

Copyright (c) Automattic <developer.wordpress.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

去到頂部