UNPKG

4.2 kBMarkdownView Raw
1
2# Stylus
3
4 Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS.
5
6## Installation
7
8 $ npm install stylus
9
10### Example
11
12 border-radius()
13 -webkit-border-radius arguments
14 -moz-border-radius arguments
15 border-radius arguments
16
17 body a
18 font 12px/1.4 "Lucida Grande", Arial, sans-serif
19 background black
20 color #ccc
21
22 form input
23 padding 5px
24 border 1px solid
25 border-radius 5px
26
27compiles to:
28
29 body a {
30 font: 12px/1.4 "Lucida Grande", Arial, sans-serif;
31 background: #000;
32 color: #ccc;
33 }
34 form input {
35 padding: 5px;
36 border: 1px solid;
37 -webkit-border-radius: 5px;
38 -moz-border-radius: 5px;
39 border-radius: 5px;
40 }
41
42### Features
43
44 Stylus has _many_ features, click the links below for detailed documentation.
45
46 - [css syntax](stylus/blob/master/docs/css-style.md) support
47 - [mixins](stylus/blob/master/docs/mixins.md)
48 - [keyword arguments](stylus/blob/master/docs/kwargs.md)
49 - [variables](stylus/blob/master/docs/variables.md)
50 - [interpolation](stylus/blob/master/docs/interpolation.md)
51 - arithmetic, logical, and equality [operators](stylus/blob/master/docs/operators.md)
52 - [importing](stylus/blob/master/docs/import.md) of other stylus sheets
53 - [introspection api](stylus/blob/master/docs/introspection.md)
54 - type coercion
55 - [conditionals](stylus/blob/master/docs/conditionals.md)
56 - [iteration](stylus/blob/master/docs/iteration.md)
57 - nested [selectors](stylus/blob/master/docs/selectors.md)
58 - parent reference
59 - in-language [functions](stylus/blob/master/docs/functions.md)
60 - [variable arguments](stylus/blob/master/docs/vargs.md)
61 - built-in [functions](stylus/blob/master/docs/bifs.md) (over 25)
62 - optional [image inlining](stylus/blob/master/docs/functions.url.md)
63 - optional compression
64 - JavaScript [API](stylus/blob/master/docs/js.md)
65 - extremely terse syntax
66 - stylus [executable](stylus/blob/master/docs/executable.md)
67 - [error reporting](stylus/blob/master/docs/error-reporting.md)
68 - single-line and multi-line [comments](stylus/blob/master/docs/comments.md)
69 - css [literal](stylus/blob/master/docs/literal.md)
70 - character [escaping](stylus/blob/master/docs/escape.md)
71 - [@keyframes](stylus/blob/master/docs/keyframes.md) support
72 - [@font-face](stylus/blob/master/docs/font-face.md) support
73 - [@media](stylus/blob/master/docs/media.md) support
74 - Connect [Middleware](stylus/blob/master/docs/middleware.md)
75 - TextMate [bundle](stylus/blob/master/docs/textmates.md)
76 - VIM [Syntax](https://github.com/wavded/vim-stylus)
77
78### Framework Support
79
80 - [Connect](stylus/blob/master/docs/middleware.md)
81 - [Ruby On Rails](https://github.com/lucasmazza/stylus_rails)
82
83### Screencasts
84
85 - [Stylus Intro](http://screenr.com/bNY)
86 - [CSS Syntax & Postfix Conditionals](http://screenr.com/A8v)
87
88### Authors
89
90 - [TJ Holowaychuk (visionmedia)](http://github.com/visionmedia)
91
92### More Information
93
94 - Language [comparisons](stylus/blob/master/docs/compare.md)
95
96## License
97
98(The MIT License)
99
100Copyright (c) 2010 LearnBoost <dev@learnboost.com>
101
102Permission is hereby granted, free of charge, to any person obtaining
103a copy of this software and associated documentation files (the
104'Software'), to deal in the Software without restriction, including
105without limitation the rights to use, copy, modify, merge, publish,
106distribute, sublicense, and/or sell copies of the Software, and to
107permit persons to whom the Software is furnished to do so, subject to
108the following conditions:
109
110The above copyright notice and this permission notice shall be
111included in all copies or substantial portions of the Software.
112
113THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
114EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
115MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
116IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
117CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
118TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
119SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\No newline at end of file