Socket
Socket
Sign inDemoInstall

postcss-custom-properties

Package Overview
Dependencies
Maintainers
1
Versions
89
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 3.0.1 to 3.1.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 3.1.0 - 2015-03-16
- Added: variables defined in JS are now automatically prefixed with `--`
([0691784](https://github.com/postcss/postcss-custom-properties/commit/0691784ed2218d7e6b16da8c4df03e2ca0c4798c))
# 3.0.1 - 2015-02-06

@@ -2,0 +7,0 @@

11

index.js

@@ -23,3 +23,12 @@ /**

options = options || {}
var variables = options.variables || {}
var userVariables = options.variables || {}
var variables =
Object.keys(userVariables)
.reduce(function(acc, key) {
if (key.indexOf("--") !== 0) {
acc["--" + key] = userVariables[key]
}
acc[key] = userVariables[key]
return acc
}, {})
var preserve = (options.preserve === true ? true : false)

@@ -26,0 +35,0 @@ var map = {}

2

package.json
{
"name": "postcss-custom-properties",
"version": "3.0.1",
"version": "3.1.0",
"description": "PostCSS plugin to polyfill W3C CSS Custom Properties for cascading variables",

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

@@ -72,2 +72,4 @@ # postcss-custom-properties [![Build Status](https://travis-ci.org/postcss/postcss-custom-properties.png)](https://travis-ci.org/postcss/postcss-custom-properties)

Allow you to pass an object of variables for `:root`. These definitions will override any that exist in the CSS.
The keys are automatically prefixed with the CSS `--` to make it easier to share
variables in your codebase.

@@ -74,0 +76,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