Socket
Socket
Sign inDemoInstall

postcss-variables

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-variables - npm Package Compare versions

Comparing version 0.2.1 to 1.0.0

14

index.js

@@ -156,12 +156,8 @@ const postcss = require('postcss');

function eachMixin(node, parent, nodeCount) {
node.arguments = node.arguments.map(arg => {
if (typeof arg === 'object') {
Object.keys(arg).forEach(key => {
arg[key] = getVariableTransformedString(parent, arg[key]);
});
} else {
arg = getVariableTransformedString(parent, arg);
}
node.arguments.ordered = node.arguments.ordered.map(arg => {
return getVariableTransformedString(parent, arg);
});
return arg;
Object.keys(node.arguments.named).forEach(arg => {
node.arguments.named[arg] = getVariableTransformedString(parent, node.arguments.named[arg]);
});

@@ -168,0 +164,0 @@

{
"name": "postcss-variables",
"version": "0.2.1",
"version": "1.0.0",
"description": "PostCSS plugin that converts variables into CSS",

@@ -16,2 +16,3 @@ "main": "index.js",

},
"repository": "nathanhood/postcss-variables",
"author": "Nathan Hood",

@@ -26,5 +27,5 @@ "license": "MIT",

"mocha": "^3.2.0",
"postcss-js-mixins": "^0.2",
"postcss-wee-syntax": "^1.1.1"
"postcss-js-mixins": "^2.0.1",
"postcss-wee-syntax": "2.0.0"
}
}

@@ -5,2 +5,3 @@ # PostCSS Variables

[![codecov](https://codecov.io/gh/nathanhood/postcss-variables/branch/master/graph/badge.svg)](https://codecov.io/gh/nathanhood/postcss-variables)
[![npm version](https://badge.fury.io/js/postcss-variables.svg)](https://badge.fury.io/js/postcss-variables)

@@ -164,4 +165,2 @@ <img align="right" width="135" height="95" src="http://postcss.github.io/postcss/logo-leftp.png" title="Philosopher’s stone, logo of PostCSS">

module.exports = register(vars);
```
**Note:** Please refer to [Advanced Variables](https://github.com/jonathantneal/postcss-advanced-variables) for more advanced features. This library is essentially a simplification and alteration of that plugin. Thank you to the author for making it available.
```

@@ -338,2 +338,14 @@ const expect = require('chai').expect;

});
it('should resolve key: value params passed into mixin', () => {
return processMixins(
`$color: #000;
.block {
mixin(color: $color, 10, 30px);
}`,
`.block {
mixin(10, 30px, color: #000);
}`
);
});
});

@@ -340,0 +352,0 @@

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