Skip to content

Bump playground postcss-css-variables to v0.5.0 #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

# v0.5.0 - 2015-9-12

- Upgrade to PostCSS v5. Fix #20

# v0.4.0 - 2015-7-2

- Fix #15
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CSS variables or CSS Custom Properties limited subset polyfill/shim.

We strive for the most complete transformation but we/no plugin can achieve true complete parity according to the [specification](http://dev.w3.org/csswg/css-variables/) because of the DOM cascade unknowns.

## Latest Version: v0.4.0
## Latest Version: v0.5.0
### [Changelog](https://github.com/MadLittleMods/postcss-css-variables/blob/master/CHANGELOG.md)

### Install
Expand Down
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// PostCSS CSS Variables (postcss-css-variables)
// v0.4.0
// v0.5.0
//
// https://github.com/MadLittleMods/postcss-css-variables

Expand All @@ -24,7 +24,7 @@ var RE_VAR_PROP = (/(--(.+))/);

function eachCssVariableDeclaration(css, cb) {
// 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
if(RE_VAR_PROP.test(decl.prop)) {
cb(decl);
Expand All @@ -42,7 +42,7 @@ function cleanUpNode(currentNodeToRemove) {
// Get a reference to it before we remove and lose reference to the child after removing it
currentNodeToPossiblyCleanUp = currentNodeToPossiblyCleanUp.parent;

nodeToRemove.removeSelf();
nodeToRemove.remove();
}
}

Expand Down Expand Up @@ -160,7 +160,7 @@ module.exports = postcss.plugin('postcss-css-variables', function(options) {

// Remove the variable declaration because they are pretty much useless after we resolve them
if(!opts.preserve) {
decl.removeSelf();
decl.remove();
}
// Or we can also just show the computed value used for that variable
else if(opts.preserve === 'computed') {
Expand All @@ -186,7 +186,7 @@ module.exports = postcss.plugin('postcss-css-variables', function(options) {

// Collect all the rules that have declarations that use variables
var rulesThatHaveDeclarationsWithVariablesList = [];
css.eachRule(function(rule) {
css.walkRules(function(rule) {
var doesRuleUseVariables = rule.nodes.some(function(node) {
if(node.type === 'decl') {
var decl = node;
Expand Down Expand Up @@ -218,7 +218,7 @@ module.exports = postcss.plugin('postcss-css-variables', function(options) {
return ruleClone;
});

rule.removeSelf();
rule.remove();
}

// Resolve the declarations
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"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",
"keywords": [
"postcss",
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"escape-string-regexp": "^1.0.3",
"extend": "^2.0.1",
"postcss": "^4.1.11"
"postcss": "^5.0.5"
},
"devDependencies": {
"bluebird": "^2.9.26",
Expand Down
14,840 changes: 7,703 additions & 7,137 deletions playground/build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion playground/build.js.map

Large diffs are not rendered by default.

1,034 changes: 549 additions & 485 deletions playground/caniuse-db-json-systemjs-paths.json

Large diffs are not rendered by default.

Loading