stylus-source 0.21.2 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/VERSION +1 -1
  2. data/vendor/History.md +11 -0
  3. data/vendor/Readme.md +4 -0
  4. data/vendor/bin/stylus +9 -32
  5. data/vendor/docs/bifs.md +16 -0
  6. data/vendor/docs/js.md +2 -0
  7. data/vendor/editors/Stylus.tmbundle/Syntaxes/Stylus.tmLanguage +67 -7
  8. data/vendor/lib/functions/index.styl +16 -0
  9. data/vendor/lib/lexer.js +13 -0
  10. data/vendor/lib/nodes/extend.js +41 -0
  11. data/vendor/lib/nodes/group.js +1 -0
  12. data/vendor/lib/nodes/index.js +1 -0
  13. data/vendor/lib/nodes/page.js +1 -1
  14. data/vendor/lib/parser.js +10 -0
  15. data/vendor/lib/renderer.js +13 -0
  16. data/vendor/lib/stylus.js +1 -1
  17. data/vendor/lib/utils.js +66 -0
  18. data/vendor/lib/visitor/compiler.js +65 -61
  19. data/vendor/lib/visitor/evaluator.js +10 -0
  20. data/vendor/lib/visitor/normalizer.js +226 -0
  21. data/vendor/node_modules/cssom/docs/parse.html +15 -1
  22. data/vendor/node_modules/cssom/docs/parse.html_ +268 -0
  23. data/vendor/node_modules/cssom/lib/CSSStyleDeclaration.js +18 -2
  24. data/vendor/node_modules/cssom/lib/parse.js +0 -18
  25. data/vendor/node_modules/cssom/package.json +1 -1
  26. data/vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js +10 -3
  27. data/vendor/package.json +2 -2
  28. data/vendor/test/cases/bifs.keys.css +4 -0
  29. data/vendor/test/cases/bifs.keys.styl +6 -0
  30. data/vendor/test/cases/bifs.values.css +5 -0
  31. data/vendor/test/cases/bifs.values.styl +6 -0
  32. data/vendor/test/cases/css.extend.css +13 -0
  33. data/vendor/test/cases/css.extend.styl +15 -0
  34. data/vendor/test/cases/extend.complex.css +16 -0
  35. data/vendor/test/cases/extend.complex.styl +15 -0
  36. data/vendor/test/cases/extend.css +22 -0
  37. data/vendor/test/cases/extend.multiple-definitions.css +11 -0
  38. data/vendor/test/cases/extend.multiple-definitions.styl +9 -0
  39. data/vendor/test/cases/extend.styl +22 -0
  40. data/vendor/testing/foo.css +3753 -3
  41. data/vendor/testing/foo.styl +7 -0
  42. data/vendor/testing/index.html +5 -50
  43. data/vendor/testing/test.css +19 -4
  44. data/vendor/testing/test.styl +19 -12
  45. metadata +18 -2
@@ -0,0 +1,7 @@
1
+ body
2
+ foo: 'bar'
3
+ bar: 'baz'
4
+
5
+ a:hover
6
+ text-decoration: underline
7
+
@@ -1,56 +1,11 @@
1
1
  <html>
2
2
  <head>
3
- <!--<link rel="stylesheet/stylus"></link>-->
4
- <style type="text/stylus">
5
- fg = white
6
- body {
7
- color: fg;
8
- background: black;
9
- }
10
- </style>
11
- <script src="../stylus.js"></script>
12
- <script>
13
-
14
- function createStylesheet(css) {
15
- var el = document.createElement('style');
16
- el.type = 'text/css';
17
- el.media = 'screen';
18
- el.id = 'todo';
19
- el.textContent = css;
20
- document.getElementsByTagName('head')[0].appendChild(el);
21
- }
22
-
23
- onload = function(){
24
- var styles = document.getElementsByTagName('style')
25
- , indent
26
- , styl;
27
-
28
- // TODO: link tags like https://github.com/cloudhead/less.js/blob/master/dist/less-1.1.4.js#L2463
29
- // TODO: strip indentation
30
- for (var i = 0, len = styles.length; i < len; ++i) {
31
- if ('text/stylus' == styles[i].type) {
32
- styl = styles[i].textContent;
33
- stylus(styl.trim())
34
- .render(function(err, css){
35
- if (err) throw err;
36
- createStylesheet(css);
37
- });
38
- }
39
- }
40
- };
41
- </script>
3
+ <link rel="stylesheet" href="test.css" type="text/css" media="screen" title="no title" charset="utf-8">
42
4
  </head>
43
5
  <body>
44
- <div id="dialog">
45
- <h1>Dialog</h1>
46
- <p>Some random dialog</p>
47
- </div>
48
-
49
- <div class="tip username-tip">Please enter your username</div>
50
- <div class="tip password-tip">Please enter your password</div>
51
- <div id="content">
52
- <p><input type="text" class="username" placeholder="Username:"></p>
53
- <p><input type="text" class="password" placeholder="Password:"></p>
54
- </div>
6
+ <p class="message">Message</p>
7
+ <p class="warning">Warning</p>
8
+ <p class="error">Error</p>
9
+ <p class="fatal">Fatal</p>
55
10
  </body>
56
11
  </html>
@@ -1,6 +1,21 @@
1
- foo {
2
- bar: 'baz';
1
+ .message,
2
+ .warning,
3
+ .error,
4
+ .fatal {
5
+ padding: 10px;
6
+ font: 14px Helvetica;
7
+ border: 1px solid #eee;
3
8
  }
4
- body {
5
- foo: 'bar';
9
+ .warning {
10
+ border-color: #e2e21e;
11
+ background: #f6f6bc;
12
+ }
13
+ .error,
14
+ .fatal {
15
+ border-color: #e33e1e;
16
+ background: #f7c5bc;
17
+ }
18
+ .fatal {
19
+ font-weight: bold;
20
+ color: #e33e1e;
6
21
  }
@@ -1,16 +1,23 @@
1
1
 
2
+ red = #E33E1E
3
+ yellow = #E2E21E
2
4
 
3
- // foo
4
- // a[href]
5
- // h1[title]
6
- // background: brown
5
+ .message
6
+ padding: 10px
7
+ font: 14px Helvetica
8
+ border: 1px solid #eee
7
9
 
8
- // body
9
- // a[href]
10
- // h1[title]
11
- // background: brown
10
+ .warning
11
+ @extends .message
12
+ border-color: yellow
13
+ background: yellow + 70%
12
14
 
13
- body
14
- foo: unit(16 / 4, px)
15
- foo: foo(16 / 4)
16
- foo: (16/4)px
15
+ .error
16
+ @extends .message
17
+ border-color: red
18
+ background: red + 70%
19
+
20
+ .fatal
21
+ @extends .error
22
+ font-weight: bold
23
+ color: red
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stylus-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.2
4
+ version: 0.22.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-30 00:00:00.000000000 Z
12
+ date: 2012-01-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Robust, expressive, and feature-rich CSS superset. This gem packages
15
15
  up stylus for use with the stylus gem.
@@ -117,6 +117,7 @@ files:
117
117
  - vendor/lib/nodes/comment.js
118
118
  - vendor/lib/nodes/each.js
119
119
  - vendor/lib/nodes/expression.js
120
+ - vendor/lib/nodes/extend.js
120
121
  - vendor/lib/nodes/fontface.js
121
122
  - vendor/lib/nodes/function.js
122
123
  - vendor/lib/nodes/group.js
@@ -154,6 +155,7 @@ files:
154
155
  - vendor/lib/visitor/compiler.js
155
156
  - vendor/lib/visitor/evaluator.js
156
157
  - vendor/lib/visitor/index.js
158
+ - vendor/lib/visitor/normalizer.js
157
159
  - vendor/LICENSE
158
160
  - vendor/Makefile
159
161
  - vendor/node_modules/cssom/animation.html
@@ -167,6 +169,7 @@ files:
167
169
  - vendor/node_modules/cssom/docs/diff.html
168
170
  - vendor/node_modules/cssom/docs/foo.css
169
171
  - vendor/node_modules/cssom/docs/parse.html
172
+ - vendor/node_modules/cssom/docs/parse.html_
170
173
  - vendor/node_modules/cssom/docs/parse2.html
171
174
  - vendor/node_modules/cssom/docs/parser.html
172
175
  - vendor/node_modules/cssom/index.html
@@ -248,6 +251,8 @@ files:
248
251
  - vendor/test/cases/bifs.image-size.styl
249
252
  - vendor/test/cases/bifs.join.css
250
253
  - vendor/test/cases/bifs.join.styl
254
+ - vendor/test/cases/bifs.keys.css
255
+ - vendor/test/cases/bifs.keys.styl
251
256
  - vendor/test/cases/bifs.last.css
252
257
  - vendor/test/cases/bifs.last.styl
253
258
  - vendor/test/cases/bifs.length.css
@@ -276,6 +281,8 @@ files:
276
281
  - vendor/test/cases/bifs.unquote.styl
277
282
  - vendor/test/cases/bifs.url.css
278
283
  - vendor/test/cases/bifs.url.styl
284
+ - vendor/test/cases/bifs.values.css
285
+ - vendor/test/cases/bifs.values.styl
279
286
  - vendor/test/cases/casting.css
280
287
  - vendor/test/cases/casting.styl
281
288
  - vendor/test/cases/coercion.css
@@ -294,6 +301,8 @@ files:
294
301
  - vendor/test/cases/control.blueprint.screen.styl
295
302
  - vendor/test/cases/control.boilerplate.css
296
303
  - vendor/test/cases/control.boilerplate.styl
304
+ - vendor/test/cases/css.extend.css
305
+ - vendor/test/cases/css.extend.styl
297
306
  - vendor/test/cases/css.functions.single-line.css
298
307
  - vendor/test/cases/css.functions.single-line.styl
299
308
  - vendor/test/cases/css.if.css
@@ -322,6 +331,12 @@ files:
322
331
  - vendor/test/cases/eol-escape.styl
323
332
  - vendor/test/cases/escape.css
324
333
  - vendor/test/cases/escape.styl
334
+ - vendor/test/cases/extend.complex.css
335
+ - vendor/test/cases/extend.complex.styl
336
+ - vendor/test/cases/extend.css
337
+ - vendor/test/cases/extend.multiple-definitions.css
338
+ - vendor/test/cases/extend.multiple-definitions.styl
339
+ - vendor/test/cases/extend.styl
325
340
  - vendor/test/cases/fontface.css
326
341
  - vendor/test/cases/fontface.styl
327
342
  - vendor/test/cases/for.complex.css
@@ -623,6 +638,7 @@ files:
623
638
  - vendor/test/images/tux.png
624
639
  - vendor/test/run.js
625
640
  - vendor/testing/foo.css
641
+ - vendor/testing/foo.styl
626
642
  - vendor/testing/index.html
627
643
  - vendor/testing/stylus.js
628
644
  - vendor/testing/test-js.js