postcss-css-variables
Advanced tools
Comparing version
# v0.5.0 - 2015-9-12 | ||
- Upgrade to PostCSS v5. Fix #20 | ||
# v0.4.0 - 2015-7-2 | ||
@@ -3,0 +7,0 @@ |
12
index.js
// PostCSS CSS Variables (postcss-css-variables) | ||
// v0.4.0 | ||
// v0.5.0 | ||
// | ||
@@ -27,3 +27,3 @@ // https://github.com/MadLittleMods/postcss-css-variables | ||
// Loop through all of the declarations and grab the variables and put them in the map | ||
css.eachDecl(function(decl) { | ||
css.walkDecls(function(decl) { | ||
// If declaration is a variable | ||
@@ -46,3 +46,3 @@ if(RE_VAR_PROP.test(decl.prop)) { | ||
nodeToRemove.removeSelf(); | ||
nodeToRemove.remove(); | ||
} | ||
@@ -165,3 +165,3 @@ } | ||
if(!opts.preserve) { | ||
decl.removeSelf(); | ||
decl.remove(); | ||
} | ||
@@ -192,3 +192,3 @@ // Or we can also just show the computed value used for that variable | ||
var rulesThatHaveDeclarationsWithVariablesList = []; | ||
css.eachRule(function(rule) { | ||
css.walkRules(function(rule) { | ||
var doesRuleUseVariables = rule.nodes.some(function(node) { | ||
@@ -225,3 +225,3 @@ if(node.type === 'decl') { | ||
rule.removeSelf(); | ||
rule.remove(); | ||
} | ||
@@ -228,0 +228,0 @@ |
{ | ||
"name": "postcss-css-variables", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "PostCSS plugin to transform CSS Custom Properties(CSS variables) syntax into a static representation", | ||
@@ -19,3 +19,3 @@ "keywords": [ | ||
"extend": "^2.0.1", | ||
"postcss": "^4.1.11" | ||
"postcss": "^5.0.5" | ||
}, | ||
@@ -22,0 +22,0 @@ "devDependencies": { |
@@ -11,3 +11,3 @@ [](http://badge.fury.io/js/postcss-css-variables) [](https://travis-ci.org/MadLittleMods/postcss-css-variables) | ||
## Latest Version: v0.4.0 | ||
## Latest Version: v0.5.0 | ||
### [Changelog](https://github.com/MadLittleMods/postcss-css-variables/blob/master/CHANGELOG.md) | ||
@@ -14,0 +14,0 @@ |
47678
0.1%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated