UNPKG

4.09 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 - [variables](stylus/blob/master/docs/variables.md)
49 - [interpolation](stylus/blob/master/docs/interpolation.md)
50 - arithmetic, logical, and equality [operators](stylus/blob/master/docs/operators.md)
51 - [importing](stylus/blob/master/docs/import.md) of other stylus sheets
52 - [introspection api](stylus/blob/master/docs/introspection.md)
53 - type coercion
54 - [conditionals](stylus/blob/master/docs/conditionals.md)
55 - [iteration](stylus/blob/master/docs/iteration.md)
56 - nested [selectors](stylus/blob/master/docs/selectors.md)
57 - parent reference
58 - in-language [functions](stylus/blob/master/docs/functions.md)
59 - [variable arguments](stylus/blob/master/docs/vargs.md)
60 - built-in [functions](stylus/blob/master/docs/bifs.md) (over 25)
61 - optional [image inlining](stylus/blob/master/docs/functions.url.md)
62 - optional compression
63 - JavaScript [API](stylus/blob/master/docs/js.md)
64 - extremely terse syntax
65 - stylus [executable](stylus/blob/master/docs/executable.md)
66 - [error reporting](stylus/blob/master/docs/error-reporting.md)
67 - single-line and multi-line [comments](stylus/blob/master/docs/comments.md)
68 - css [literal](stylus/blob/master/docs/literal.md)
69 - character [escaping](stylus/blob/master/docs/escape.md)
70 - [@keyframes](stylus/blob/master/docs/keyframes.md) support
71 - [@font-face](stylus/blob/master/docs/font-face.md) support
72 - [@media](stylus/blob/master/docs/media.md) support
73 - Connect [Middleware](stylus/blob/master/docs/middleware.md)
74 - TextMate [bundle](stylus/blob/master/docs/textmates.md)
75
76### Framework Support
77
78 - [Connect](stylus/blob/master/docs/middleware.md)
79 - [Ruby On Rails](https://github.com/lucasmazza/stylus_rails)
80
81### Screencasts
82
83 - [Stylus Intro](http://screenr.com/bNY)
84 - [CSS Syntax & Postfix Conditionals](http://screenr.com/A8v)
85
86### Authors
87
88 - [TJ Holowaychuk (visionmedia)](http://github.com/visionmedia)
89
90### More Information
91
92 - Language [comparisons](stylus/blob/master/docs/compare.md)
93
94## License
95
96(The MIT License)
97
98Copyright (c) 2010 LearnBoost <dev@learnboost.com>
99
100Permission is hereby granted, free of charge, to any person obtaining
101a copy of this software and associated documentation files (the
102'Software'), to deal in the Software without restriction, including
103without limitation the rights to use, copy, modify, merge, publish,
104distribute, sublicense, and/or sell copies of the Software, and to
105permit persons to whom the Software is furnished to do so, subject to
106the following conditions:
107
108The above copyright notice and this permission notice shall be
109included in all copies or substantial portions of the Software.
110
111THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
112EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
113MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
114IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
115CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
116TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
117SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\No newline at end of file