stylus-source 0.27.2 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/vendor/lib/functions/index.js +56 -1
- data/vendor/lib/stylus.js +1 -1
- data/vendor/lib/visitor/evaluator.js +2 -1
- data/vendor/node_modules/cssom/package.json +0 -3
- data/vendor/node_modules/mocha/node_modules/commander/package.json +0 -3
- data/vendor/node_modules/mocha/node_modules/diff/package.json +0 -3
- data/vendor/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json +0 -3
- data/vendor/node_modules/mocha/node_modules/jade/package.json +0 -3
- data/vendor/node_modules/mocha/package.json +0 -3
- data/vendor/package.json +1 -1
- data/vendor/testing/small.styl +10 -22
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.28.0
|
@@ -12,7 +12,8 @@
|
|
12
12
|
var Compiler = require('../visitor/compiler')
|
13
13
|
, nodes = require('../nodes')
|
14
14
|
, utils = require('../utils')
|
15
|
-
, Image = require('./image')
|
15
|
+
, Image = require('./image')
|
16
|
+
, path = require('path');
|
16
17
|
|
17
18
|
/**
|
18
19
|
* Color component name map.
|
@@ -174,6 +175,60 @@ exports.component = function component(color, name) {
|
|
174
175
|
return new nodes.Unit(color[type][name], unit);
|
175
176
|
};
|
176
177
|
|
178
|
+
/**
|
179
|
+
* Return the basename of `path`.
|
180
|
+
*
|
181
|
+
* @param {String} path
|
182
|
+
* @return {String}
|
183
|
+
* @api public
|
184
|
+
*/
|
185
|
+
|
186
|
+
exports.basename = function basename(p, ext){
|
187
|
+
utils.assertString(p, 'path');
|
188
|
+
return path.basename(p.val, ext && ext.val);
|
189
|
+
};
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Return the dirname of `path`.
|
193
|
+
*
|
194
|
+
* @param {String} path
|
195
|
+
* @return {String}
|
196
|
+
* @api public
|
197
|
+
*/
|
198
|
+
|
199
|
+
exports.dirname = function dirname(p){
|
200
|
+
utils.assertString(p, 'path');
|
201
|
+
return path.dirname(p.val);
|
202
|
+
};
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Return the extname of `path`.
|
206
|
+
*
|
207
|
+
* @param {String} path
|
208
|
+
* @return {String}
|
209
|
+
* @api public
|
210
|
+
*/
|
211
|
+
|
212
|
+
exports.extname = function extname(p){
|
213
|
+
utils.assertString(p, 'path');
|
214
|
+
return path.extname(p.val);
|
215
|
+
};
|
216
|
+
|
217
|
+
/**
|
218
|
+
* Peform a path join.
|
219
|
+
*
|
220
|
+
* @param {String} path
|
221
|
+
* @return {String}
|
222
|
+
* @api public
|
223
|
+
*/
|
224
|
+
|
225
|
+
(exports.pathjoin = function pathjoin(){
|
226
|
+
var paths = [].slice.call(arguments).map(function(path){
|
227
|
+
return path.first.string;
|
228
|
+
});
|
229
|
+
return path.join.apply(null, paths);
|
230
|
+
}).raw = true;
|
231
|
+
|
177
232
|
/**
|
178
233
|
* Return the red component of the given `color`.
|
179
234
|
*
|
data/vendor/lib/stylus.js
CHANGED
@@ -607,7 +607,8 @@ Evaluator.prototype.visitIf = function(node){
|
|
607
607
|
|
608
608
|
Evaluator.prototype.visitExtend = function(extend){
|
609
609
|
var selector = extend.selector;
|
610
|
-
this.currentBlock
|
610
|
+
var block = this.targetBlock || this.currentBlock;
|
611
|
+
block.node.extends.push(selector);
|
611
612
|
return nodes.null;
|
612
613
|
};
|
613
614
|
|
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.
|
3
|
+
, "version": "0.28.0"
|
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/small.styl
CHANGED
@@ -1,23 +1,11 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
// foo: n for n in 1..3
|
13
|
-
//
|
14
|
-
// body
|
15
|
-
// val = n for n in 1..3
|
16
|
-
// foo: val
|
17
|
-
|
18
|
-
//
|
19
|
-
// body
|
20
|
-
// foo: foo bar (1)px
|
21
|
-
// foo: foo bar (2 * 5)px
|
22
|
-
// foo: foo (2 * 5)px bar
|
23
|
-
// foo: foo (2 * 5)em bar
|
2
|
+
image(path, width = auto, height = auto)
|
3
|
+
background-image: url(path)
|
4
|
+
@media all and (-webkit-min-device-pixel-ratio: 1.5)
|
5
|
+
ext = extname(path)
|
6
|
+
path = pathjoin(dirname(path), basename(path, ext) + '@2x' + ext)
|
7
|
+
background-image: url(path)
|
8
|
+
background-size: width height
|
9
|
+
|
10
|
+
#logo
|
11
|
+
image: '/images/logo.main.png' 50px 100px
|