Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 117 lines (85 sloc) 3.403 kb
ad37ee1 @tj Initial commit
tj authored
1
ccc57e2 @tj Added example to readme
tj authored
2 # Stylus
3
5cd3c2e @tj docs
tj authored
4 Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS.
d8ac0cd @tj Arithmetic docs
tj authored
5
ccc57e2 @tj Added example to readme
tj authored
6 ### Example
7
5cd3c2e @tj docs
tj authored
8 border-radius(n)
9 -webkit-border-radius n
10 -moz-border-radius n
11 border-radius n
12
ccc57e2 @tj Added example to readme
tj authored
13 body a
14 font 12px "Lucida Grande", Arial, sans-serif
15 background black
16 color #ccc
17
18 form input
19 padding 5px
20 border 1px solid
5cd3c2e @tj docs
tj authored
21 border-radius 5px
ccc57e2 @tj Added example to readme
tj authored
22
23 compiles to:
24
25 body a {
26 font: 12px "Lucida Grande", Arial, sans-serif;
27 background: #000;
28 color: #ccc;
29 }
30 form input {
31 padding: 5px;
32 border: 1px solid;
5cd3c2e @tj docs
tj authored
33 -webkit-border-radius: 5px;
34 -moz-border-radius: 5px;
35 border-radius: 5px;
ccc57e2 @tj Added example to readme
tj authored
36 }
ad37ee1 @tj Initial commit
tj authored
37
e75d1ee @tj features
tj authored
38 ### Features
39
418ec2b @tj link to error-reporting.md
tj authored
40 Stylus has _many_ features, click the links below for detailed documentation.
41
96a281d @tj Mixins / functions
tj authored
42 - [mixins](stylus/blob/master/docs/mixins.md)
dc41db3 @tj feature links
tj authored
43 - [variables](stylus/blob/master/docs/variables.md)
44 - arithmetic, logical, and equality [operators](stylus/blob/master/docs/operators.md)
e75d1ee @tj features
tj authored
45 - type coercion
dc41db3 @tj feature links
tj authored
46 - [conditionals](stylus/blob/master/docs/conditionals.md)
e85f138 @tj Added selectors.md
tj authored
47 - nested [selectors](stylus/blob/master/docs/selectors.md)
e75d1ee @tj features
tj authored
48 - parent reference
96a281d @tj Mixins / functions
tj authored
49 - in-language [functions](stylus/blob/master/docs/functions.md)
b5916f1 @tj Added functions.url.md
tj authored
50 - optional [image inlining](stylus/blob/master/docs/functions.url.md)
e75d1ee @tj features
tj authored
51 - optional compression
1da9e42 @tj js api docs
tj authored
52 - JavaScript [API](stylus/blob/master/docs/js.md)
dc41db3 @tj feature links
tj authored
53 - built-in [functions](stylus/blob/master/docs/bifs.md) (over 25)
e75d1ee @tj features
tj authored
54 - extremely terse syntax
dc41db3 @tj feature links
tj authored
55 - stylus [executable](stylus/blob/master/docs/executable.md)
418ec2b @tj link to error-reporting.md
tj authored
56 - [error reporting](stylus/blob/master/docs/error-reporting.md)
9bed5d5 @tj Added comments.md
tj authored
57 - single-line and multi-line [comments](stylus/blob/master/docs/comments.md)
bcff498 @tj Comment docs
tj authored
58
4a917d7 @tj docs
tj authored
59 ### Import
60
61 Literal css import:
62
63 @import "foo.css"
64
65 compiles to:
66
67 @import "foo.css"
68
69 Import of _.styl_ files should omit the extension, resolving to _mixins.styl_ in this case. Functions, mixins, selectors etc can all be contained within imported files.
70
71 @import "mixins"
72
8808e13 @tj Added @css docs
tj authored
73 ### Literal CSS
74
75 If for any reason Stylus cannot accommodate a specific need, you can always resort to literal css via `@css`:
76
77
78 @css {
79 body {
80 font: 14px;
81 }
82 }
83
84 compiling to:
85
86 body {
87 font: 14px;
88 }
026a549 @tj Added bins to package.json
tj authored
89
90 ## Authors
91
92 - [TJ Holowaychuk (visionmedia)](http://github.com/visionmedia)
8808e13 @tj Added @css docs
tj authored
93
ad37ee1 @tj Initial commit
tj authored
94 ## License
95
96 (The MIT License)
97
98 Copyright (c) 2010 LearnBoost <dev@learnboost.com>
99
100 Permission is hereby granted, free of charge, to any person obtaining
101 a copy of this software and associated documentation files (the
102 'Software'), to deal in the Software without restriction, including
103 without limitation the rights to use, copy, modify, merge, publish,
104 distribute, sublicense, and/or sell copies of the Software, and to
105 permit persons to whom the Software is furnished to do so, subject to
106 the following conditions:
107
108 The above copyright notice and this permission notice shall be
109 included in all copies or substantial portions of the Software.
110
111 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
112 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
113 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
114 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
115 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
116 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
117 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.