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 +1 -1
- data/vendor/History.md +6 -0
- data/vendor/lib/nodes/boolean.js +1 -1
- data/vendor/lib/nodes/selector.js +1 -0
- data/vendor/lib/parser.js +7 -6
- data/vendor/lib/stylus.js +1 -1
- data/vendor/lib/visitor/compiler.js +7 -3
- data/vendor/lib/visitor/normalizer.js +1 -0
- data/vendor/package.json +1 -1
- data/vendor/test/cases/regression.499.css +14 -0
- data/vendor/test/cases/regression.499.styl +20 -0
- data/vendor/testing/index.js +1 -1
- data/vendor/testing/test.styl +0 -41
- metadata +4 -3
- data/vendor/testing/extend.styl +0 -43
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.22.
|
1
|
+
0.22.4
|
data/vendor/History.md
CHANGED
data/vendor/lib/nodes/boolean.js
CHANGED
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.
|
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.
|
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
@@ -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
|
-
|
436
|
-
|
437
|
-
|
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
|
+
, "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"
|
data/vendor/testing/index.js
CHANGED
data/vendor/testing/test.styl
CHANGED
@@ -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.
|
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-
|
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
|
data/vendor/testing/extend.styl
DELETED
@@ -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
|