postcss-custom-properties
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -0,1 +1,5 @@ | ||
# 2.1.1 - 2014-12-02 | ||
- Fix issue when multiples undefined custom properties are referenced ([#16](https://github.com/postcss/postcss-custom-properties/issues/16)) | ||
# 2.1.0 - 2014-11-25 | ||
@@ -2,0 +6,0 @@ |
13
index.js
@@ -40,3 +40,10 @@ /** | ||
if (prop && prop.indexOf(VAR_PROP_IDENTIFIER) === 0) { | ||
console.warn(helpers.message("Custom property ignored: not scoped to the top-level :root element (" + rule.selectors + " { ... " + prop + ": ... })" + (rule.parent.type !== "root" ? ", in " + rule.parent.type : ""), decl.source)) | ||
console.warn( | ||
helpers.message( | ||
"Custom property ignored: not scoped to the top-level :root element (" + | ||
rule.selectors + | ||
" { ... " + prop + ": ... })" + | ||
(rule.parent.type !== "root" ? ", in " + rule.parent.type : ""), | ||
decl.source) | ||
) | ||
} | ||
@@ -118,3 +125,3 @@ }) | ||
var start = value.indexOf("var(") | ||
var start = value.indexOf(VAR_FUNC_IDENTIFIER + "(") | ||
if (start === -1) { | ||
@@ -166,3 +173,3 @@ return [value] | ||
(matches.post ? resolveValue(matches.post, variables, source) : [""]).forEach(function(afterValue) { | ||
results.push(value.slice(0, start) + value + afterValue) | ||
results.push(value.slice(0, start) + VAR_FUNC_IDENTIFIER + "(" + name + ")" + afterValue) | ||
}) | ||
@@ -169,0 +176,0 @@ } |
{ | ||
"name": "postcss-custom-properties", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "PostCSS plugin to polyfill W3C CSS Custom Properties for cascading variables", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
10575
151