Socket
Socket
Sign inDemoInstall

postcss-custom-properties

Package Overview
Dependencies
7
Maintainers
3
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0 to 8.0.1

index.cjs.js.map

4

CHANGELOG.md
# Changes to PostCSS Custom Properties
### 8.0.1 (September 17, 2018)
- Fixed: Workaround issue in `postcss-values-parser` incorrectly cloning nodes.
### 8.0.0 (September 16, 2018)

@@ -4,0 +8,0 @@

@@ -155,3 +155,3 @@ 'use strict';

// conditionally replace a known custom property
child.replaceWith(...asClonedArray(customProperties[name]));
child.replaceWith(...asClonedArray(customProperties[name], null));
const nextCustomProperties = Object.assign({}, customProperties);

@@ -185,4 +185,21 @@ delete nextCustomProperties[name];

const asClonedArray = array => array.map(node => node.clone());
const asClonedArray = (array, parent) => array.map(node => asClonedNode(node, parent)); // return a cloned node
const asClonedNode = (node, parent) => {
const cloneNode = new node.constructor(node);
for (const key in node) {
if (key === 'parent') {
cloneNode.parent = parent;
} else if (Object(node[key]).constructor === Array) {
cloneNode[key] = asClonedArray(node.nodes, cloneNode);
} else if (Object(node[key]).constructor === Object) {
cloneNode[key] = Object.assign({}, node[key]);
}
}
return cloneNode;
};
var transformProperties = ((root, customProperties, opts) => {

@@ -556,1 +573,2 @@ // walk decls that can be transformed

module.exports = index;
//# sourceMappingURL=index.cjs.js.map

6

package.json
{
"name": "postcss-custom-properties",
"version": "8.0.0",
"version": "8.0.1",
"description": "Use Custom Properties Queries in CSS",

@@ -17,3 +17,5 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>",

"index.cjs.js",
"index.es.mjs"
"index.cjs.js.map",
"index.es.mjs",
"index.es.mjs.map"
],

@@ -20,0 +22,0 @@ "scripts": {

@@ -126,5 +126,5 @@ # PostCSS Custom Properties [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]

importFrom: [
'path/to/file.css',
'and/then/this.js',
'and/then/that.json',
'path/to/file.css', // :root { --color: red; }
'and/then/this.js', // module.exports = { customProperties: { '--color': 'red' } }
'and/then/that.json', // { "custom-properties": { "--color": "red" } }
{

@@ -142,2 +142,5 @@ customProperties: { '--color': 'red' }

See example imports written in [CSS](test/import-properties.css),
[JS](test/import-properties.js), and [JSON](test/import-properties.json).
### exportTo

@@ -177,2 +180,6 @@

See example exports written to [CSS](test/export-properties.css),
[JS](test/export-properties.js), [MJS](test/export-properties.mjs), and
[JSON](test/export-properties.json).
[cli-img]: https://img.shields.io/travis/postcss/postcss-custom-properties.svg

@@ -179,0 +186,0 @@ [cli-url]: https://travis-ci.org/postcss/postcss-custom-properties

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc