Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-custom-properties

Package Overview
Dependencies
Maintainers
3
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-custom-properties - npm Package Compare versions

Comparing version 8.0.8 to 8.0.9

index.esm.mjs

4

CHANGELOG.md
# Changes to PostCSS Custom Properties
### 8.0.9 (November 5, 2018)
- Fixed: Issue with duplicate custom property usage within a declaration
### 8.0.8 (October 2, 2018)

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

15

index.cjs.js

@@ -5,6 +5,6 @@ 'use strict';

var postcss = _interopDefault(require('postcss'));
var valueParser = _interopDefault(require('postcss-values-parser'));
var fs = _interopDefault(require('fs'));
var path = _interopDefault(require('path'));
var postcss = _interopDefault(require('postcss'));

@@ -300,8 +300,15 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {

// conditionally replace a known custom property
child.replaceWith(...asClonedArrayWithBeforeSpacing(customProperties[name], child.raws.before));
retransformValueAST(root, customProperties, name);
const nodes = asClonedArrayWithBeforeSpacing(customProperties[name], child.raws.before);
child.replaceWith(...nodes);
retransformValueAST({
nodes
}, customProperties, name);
} else if (fallbacks.length) {
// conditionally replace a custom property with a fallback
const index = root.nodes.indexOf(child);
root.nodes.splice(index, 1, ...asClonedArrayWithBeforeSpacing(fallbacks, child.raws.before));
if (index !== -1) {
root.nodes.splice(index, 1, ...asClonedArrayWithBeforeSpacing(fallbacks, child.raws.before));
}
transformValueAST(root, customProperties);

@@ -308,0 +315,0 @@ }

{
"name": "postcss-custom-properties",
"version": "8.0.8",
"version": "8.0.9",
"description": "Use Custom Properties Queries in CSS",

@@ -14,8 +14,8 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>",

"main": "index.cjs.js",
"module": "index.es.mjs",
"module": "index.esm.mjs",
"files": [
"index.cjs.js",
"index.cjs.js.map",
"index.es.mjs",
"index.es.mjs.map"
"index.esm.mjs",
"index.esm.mjs.map"
],

@@ -41,7 +41,7 @@ "scripts": {

"babel-eslint": "^10.0.1",
"eslint": "^5.6.1",
"eslint": "^5.8.0",
"eslint-config-dev": "^2.0.0",
"postcss-tape": "^2.2.0",
"pre-commit": "^1.2.2",
"rollup": "^0.66.2",
"rollup": "^0.67.0",
"rollup-plugin-babel": "^4.0.3"

@@ -48,0 +48,0 @@ },

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

[cli-img]: https://img.shields.io/travis/postcss/postcss-custom-properties.svg
[cli-img]: https://img.shields.io/travis/postcss/postcss-custom-properties/master.svg
[cli-url]: https://travis-ci.org/postcss/postcss-custom-properties

@@ -185,0 +185,0 @@ [css-img]: https://cssdb.org/badge/custom-properties.svg

Sorry, the diff of this file is not supported yet

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