postcss-nesting
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -0,1 +1,8 @@ | ||
## 2.0.5 (2015-10-12) | ||
- Updated: Nested rules source map to the parent rule | ||
- Updated: PostCSS 5.0.9 | ||
- Updated: Tests and documentation | ||
- Updated: Project configuration | ||
## 2.0.4 (2015-09-23) | ||
@@ -2,0 +9,0 @@ |
19
index.js
@@ -15,7 +15,2 @@ var postcss = require('postcss'); | ||
function cleanNode(node) { | ||
if (!('before' in node.raws)) node.raws.before = node.parent.raws.before || ''; | ||
if (!('after' in node.raws)) node.raws.after = node.parent.raws.after || ''; | ||
} | ||
module.exports = postcss.plugin('postcss-nested', function (opts) { | ||
@@ -34,10 +29,6 @@ var bubble = ['document', 'media', 'supports']; | ||
if (root && rule.type === 'rule') { | ||
var newrule = postcss.rule({ | ||
raws: { | ||
before: atrule.raws.before, | ||
between: atrule.raws.between, | ||
after: atrule.raws.after | ||
} | ||
}); | ||
var newrule = rule.clone().removeAll(); | ||
newrule.source = atrule.source; | ||
if (atrule.name === name && atrule.params.indexOf('&') !== -1) { | ||
@@ -50,4 +41,2 @@ atrule.remove(); | ||
newrule.nodes.forEach(cleanNode); | ||
transpileSelectors(rule, newrule); | ||
@@ -65,4 +54,2 @@ | ||
newrule.nodes.forEach(cleanNode); | ||
atrule.removeAll(); | ||
@@ -69,0 +56,0 @@ |
{ | ||
"name": "postcss-nesting", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Transpiles nested rules according to CSS Nesting Module Level 3", | ||
@@ -24,12 +24,13 @@ "keywords": [ | ||
"dependencies": { | ||
"postcss": "^5.0.6" | ||
"postcss": "^5.0.9" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.3.0", | ||
"gulp": "^3.9.0", | ||
"gulp-eslint": "^1.0.0", | ||
"gulp-mocha": "^2.1.3" | ||
"eslint": "^1.6.0", | ||
"tap-spec": "^4.1.0", | ||
"tape": "^4.2.1" | ||
}, | ||
"scripts": { | ||
"test": "gulp" | ||
"lint": "eslint . --ignore-path .gitignore", | ||
"test-fixtures": "tape test/*.js | tap-spec", | ||
"test": "npm run lint && npm run test-fixtures" | ||
}, | ||
@@ -36,0 +37,0 @@ "engines": { |
@@ -5,3 +5,3 @@ # CSS Nesting [![Build Status][ci-img]][ci] | ||
[CSS Nesting] is a [PostCSS] plugin that allows you to nest one style rule inside another, following the [CSS Nesting Module Level 3] specification. | ||
[CSS Nesting] allows you to nest one style rule inside another, following the [CSS Nesting Module Level 3] specification. | ||
@@ -14,4 +14,5 @@ ```css | ||
@nest c, d { | ||
@nest & c, & d { | ||
color: white; | ||
} | ||
@@ -18,0 +19,0 @@ @nest & & { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17817
3
17
316
164
1
1
Updatedpostcss@^5.0.9