UNPKG

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