Socket
Socket
Sign inDemoInstall

stylus

Package Overview
Dependencies
Maintainers
2
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus - npm Package Compare versions

Comparing version 0.41.0 to 0.41.1

3

lib/functions/url.js

@@ -74,2 +74,3 @@

, mime = mimes[ext]
, hash = url.hash || ''
, literal = new nodes.Literal('url("' + url.href + '")')

@@ -105,3 +106,3 @@ , paths = _paths.concat(this.paths)

// Encode
return new nodes.Literal('url("data:' + mime + ';base64,' + buf.toString('base64') + '")');
return new nodes.Literal('url("data:' + mime + ';base64,' + buf.toString('base64') + hash + '")');
};

@@ -108,0 +109,0 @@

@@ -51,2 +51,19 @@

/**
* Check if this block has bubbling nodes.
*
* @return {Boolean}
* @api public
*/
Block.prototype.__defineGetter__('hasBubbling', function(){
for (var i = 0, len = this.nodes.length; i < len; ++i) {
var nodeName = this.nodes[i].nodeName;
if ('media' == nodeName || 'fontface' == nodeName) {
return true;
}
}
return false;
});
/**
* Check if this block is empty.

@@ -53,0 +70,0 @@ *

@@ -353,3 +353,2 @@

arr[i].forEach(function(selector){
selector.val = selector.val || selector.toString();
if (!leaveHidden && selector.val.match(hiddenSelectorRegexp)) return;

@@ -366,3 +365,2 @@ if (selector.inherits) {

arr[0].forEach(function(selector){
selector.val = selector.val || selector.toString();
if (!leaveHidden && selector.val.match(hiddenSelectorRegexp)) return;

@@ -369,0 +367,0 @@ var str = interpolateParent(selector, buf);

@@ -682,4 +682,6 @@

// mixin conditional statements within a selector group
if (ret && !node.postfix && block.node && 'group' == block.node.nodeName) {
// mixin conditional statements within
// a selector group, @font-face block or @page block
if (ret && !node.postfix && block.node
&& ~['group', 'fontface', 'page'].indexOf(block.node.nodeName)) {
this.mixin(ret.nodes, block);

@@ -814,2 +816,3 @@ return nodes.null;

var body = fn.block.clone();
body.scope = fn.block.hasBubbling;

@@ -1182,7 +1185,9 @@ // mixin block

if (block.node && 'group' == block.node.nodeName) {
block.node.nodes.forEach(function(selector) {
if (!selector.val) selector.val = this.interpolate(selector);
}, this);
stack.push(block.node.nodes);
}
}
if (!stack.length) return '&';
return utils.compileSelectors(stack).join(',');
return stack.length ? utils.compileSelectors(stack).join(',') : '&';
});

@@ -1229,5 +1234,9 @@

case 'expression':
// Prevent cyclic `selector()` calls.
var selectorCall = ('call' == node.first.nodeName && 'selector' == node.first.name);
if (selectorCall && this._selector) return this._selector;
self.return++;
var ret = toString(self.visit(node).first);
self.return--;
if (selectorCall) this._selector = ret;
return ret;

@@ -1234,0 +1243,0 @@ }

{
"name": "stylus",
"description": "Robust, expressive, and feature-rich CSS superset",
"version": "0.41.0",
"version": "0.41.1",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc