stylus-source 0.22.3 → 0.22.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.22.3
1
+ 0.22.4
data/vendor/History.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 0.22.4 / 2012-01-11
3
+ ==================
4
+
5
+ * Fixed __@extends__ inheritance bug. Closes #499
6
+ * Fixed 'lineno' global leak due to missing `new` [teppeis]
7
+
2
8
  0.22.3 / 2012-01-11
3
9
  ==================
4
10
 
@@ -75,7 +75,7 @@ Boolean.prototype.__defineGetter__('isFalse', function(){
75
75
  */
76
76
 
77
77
  Boolean.prototype.negate = function(){
78
- return Boolean(!this.val);
78
+ return new Boolean(!this.val);
79
79
  };
80
80
 
81
81
  /**
@@ -21,6 +21,7 @@ var Block = require('./block')
21
21
 
22
22
  var Selector = module.exports = function Selector(segs){
23
23
  Node.call(this);
24
+ this.inherits = true;
24
25
  this.segments = segs;
25
26
  };
26
27
 
data/vendor/lib/parser.js CHANGED
@@ -95,6 +95,7 @@ var Parser = module.exports = function Parser(str, options) {
95
95
  this.state = ['root'];
96
96
  this.stash = [];
97
97
  this.parens = 0;
98
+ this.css = 0;
98
99
  this.state.pop = function(){
99
100
  self.prevState = [].pop.call(this);
100
101
  };
@@ -573,13 +574,13 @@ Parser.prototype = {
573
574
  block: function(node, scope) {
574
575
  var delim
575
576
  , stmt
576
- , _ = this.css
577
577
  , block = this.parent = new nodes.Block(this.parent, node);
578
578
 
579
579
  if (false === scope) block.scope = false;
580
580
 
581
581
  // css-style
582
- if (this.css = this.accept('{')) {
582
+ if (this.accept('{')) {
583
+ this.css++;
583
584
  delim = '}';
584
585
  this.skipWhitespace();
585
586
  } else {
@@ -608,7 +609,7 @@ Parser.prototype = {
608
609
  this.skipWhitespace();
609
610
  this.expect('}');
610
611
  this.skipSpaces();
611
- this.css = _;
612
+ this.css--;
612
613
  } else {
613
614
  this.expect('outdent');
614
615
  }
@@ -786,13 +787,13 @@ Parser.prototype = {
786
787
 
787
788
  keyframes: function() {
788
789
  var pos
789
- , _ = this.css
790
790
  , tok = this.expect('keyframes')
791
791
  , keyframes = new nodes.Keyframes(this.id(), tok.val)
792
792
  , vals = [];
793
793
 
794
794
  // css-style
795
- if (this.css = this.accept('{')) {
795
+ if (this.accept('{')) {
796
+ this.css++;
796
797
  this.skipWhitespace();
797
798
  } else {
798
799
  this.expect('indent');
@@ -837,7 +838,7 @@ Parser.prototype = {
837
838
  if (this.css) {
838
839
  this.skipWhitespace();
839
840
  this.expect('}');
840
- this.css = _;
841
+ this.css--;
841
842
  } else {
842
843
  this.expect('outdent');
843
844
  }
data/vendor/lib/stylus.js CHANGED
@@ -24,7 +24,7 @@ exports = module.exports = render;
24
24
  * Library version.
25
25
  */
26
26
 
27
- exports.version = '0.22.3';
27
+ exports.version = '0.22.4';
28
28
 
29
29
  /**
30
30
  * Expose nodes.
@@ -432,9 +432,13 @@ Compiler.prototype.compileSelectors = function(arr){
432
432
  function compile(arr, i) {
433
433
  if (i) {
434
434
  arr[i].forEach(function(selector){
435
- buf.unshift(selector.val);
436
- compile(arr, i - 1);
437
- buf.shift();
435
+ if (selector.inherits) {
436
+ buf.unshift(selector.val);
437
+ compile(arr, i - 1);
438
+ buf.shift();
439
+ } else {
440
+ selectors.push(selector.val);
441
+ }
438
442
  });
439
443
  } else {
440
444
  arr[0].forEach(function(selector){
@@ -159,6 +159,7 @@ Normalizer.prototype.extend = function(group, selectors){
159
159
  selectors.forEach(function(selector){
160
160
  var node = new nodes.Selector;
161
161
  node.val = selector;
162
+ node.inherits = false;
162
163
  groups.forEach(function(group){
163
164
  self.extend(group, selectors);
164
165
  group.push(node);
data/vendor/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  { "name": "stylus"
2
2
  , "description": "Robust, expressive, and feature-rich CSS superset"
3
- , "version": "0.22.3"
3
+ , "version": "0.22.4"
4
4
  , "author": "TJ Holowaychuk <tj@vision-media.ca>"
5
5
  , "keywords": ["css", "parser", "style", "stylesheets", "jade", "language"]
6
6
  , "repository": "git://github.com/learnboost/stylus"
@@ -0,0 +1,14 @@
1
+ ul li a,
2
+ a.button,
3
+ input[type=submit] {
4
+ color: #00f;
5
+ }
6
+ html body h1,
7
+ html body .title,
8
+ html body .huge-title {
9
+ font-size: 22px;
10
+ color: #000;
11
+ }
12
+ html body .huge-title {
13
+ font-size: 33px;
14
+ }
@@ -0,0 +1,20 @@
1
+
2
+ ul
3
+ li
4
+ a
5
+ color: blue
6
+
7
+ a.button
8
+ input[type=submit]
9
+ @extends ul li a
10
+
11
+ html
12
+ body
13
+ h1
14
+ font-size: 22px
15
+ color: black
16
+ .title
17
+ @extends html body h1
18
+ .huge-title
19
+ font-size: 33px
20
+ @extends html body .title
@@ -5,7 +5,7 @@
5
5
 
6
6
  var stylus = require('../')
7
7
  , fs = require('fs')
8
- , path = 'testing/extend.styl'
8
+ , path = 'testing/test.styl'
9
9
  , str = fs.readFileSync(path, 'utf8');
10
10
 
11
11
  stylus(str)
@@ -1,42 +1 @@
1
1
 
2
- @keyframes something
3
- // foo
4
- from
5
- // foo
6
- background: white
7
- // foo
8
- to
9
- background: black
10
-
11
- // block @content, mixins with blocks
12
- // media bubbling
13
- // @extend
14
-
15
- // .sidebar {
16
- // width: 300px;
17
- // @media screen and (orientation: landscape) {
18
- // &.right {
19
- // width: 500px;
20
- // }
21
- // }
22
- //
23
- // @media print {
24
- // display: none;
25
- // }
26
- // }
27
-
28
- // @media screen {
29
- // .sidebar {
30
- // @media (orientation: landscape) {
31
- // .something {
32
- // width: 500px;
33
- // }
34
- // }
35
- // }
36
- // }
37
-
38
- // @media normal {
39
- // body {
40
- // stuff: 'here';
41
- // }
42
- // }
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.22.3
4
+ version: 0.22.4
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: 2012-01-11 00:00:00.000000000 Z
12
+ date: 2012-01-15 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.
@@ -600,6 +600,8 @@ files:
600
600
  - vendor/test/cases/regression.484.styl
601
601
  - vendor/test/cases/regression.498.css
602
602
  - vendor/test/cases/regression.498.styl
603
+ - vendor/test/cases/regression.499.css
604
+ - vendor/test/cases/regression.499.styl
603
605
  - vendor/test/cases/regression.503.css
604
606
  - vendor/test/cases/regression.503.styl
605
607
  - vendor/test/cases/regression.504.css
@@ -646,7 +648,6 @@ files:
646
648
  - vendor/test/images/squirrel.jpeg
647
649
  - vendor/test/images/tux.png
648
650
  - vendor/test/run.js
649
- - vendor/testing/extend.styl
650
651
  - vendor/testing/index.js
651
652
  - vendor/testing/test.styl
652
653
  homepage: https://github.com/railsjedi/ruby-stylus-source
@@ -1,43 +0,0 @@
1
-
2
- button
3
- padding: 10px
4
- border: 1px solid #eee
5
- font-size: 12px
6
-
7
- a.button
8
- input[type=submit]
9
- @extends button
10
-
11
- .button
12
- @extends a.button
13
-
14
- // TODO: with multiple definitions of the .message should work... etc
15
-
16
- // .error
17
- // border: 1px #f00
18
- //
19
- // .serious-error
20
- // @extend .error
21
- // border-width: 3px
22
- //
23
- // .critical-error
24
- // @extend .serious-error
25
- // position: fixed
26
- // top: 10%
27
- // left: 10%
28
-
29
- // TODO: ^ should add .critical-error to .error
30
-
31
- // #content
32
- // .dialog
33
- // h1
34
- // font-size: 22px
35
- // p
36
- // padding: 5px
37
-
38
- // #content
39
- // .window
40
- // h1
41
- // @extends #content .dialog h1
42
-
43
- // TODO: ^ doesn't compile without properties