postcss-nesting
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -0,1 +1,5 @@ | ||
## 2.0.6 (2015-10-15) | ||
- Fixed: Issue with new PostCSS rules | ||
## 2.0.5 (2015-10-12) | ||
@@ -2,0 +6,0 @@ |
10
index.js
@@ -28,7 +28,7 @@ var postcss = require('postcss'); | ||
if (root && rule.type === 'rule') { | ||
var newrule = rule.clone().removeAll(); | ||
var newrule = postcss.rule({ | ||
source: atrule.source | ||
}); | ||
newrule.source = atrule.source; | ||
if (atrule.name === name && atrule.params.indexOf('&') !== -1) { | ||
if (atrule.name === name && ~atrule.params.indexOf('&')) { | ||
atrule.remove(); | ||
@@ -45,3 +45,3 @@ | ||
rule.insertAfterNode = newrule; | ||
} else if (bubble.indexOf(atrule.name) !== -1) { | ||
} else if (~bubble.indexOf(atrule.name)) { | ||
atrule.remove(); | ||
@@ -48,0 +48,0 @@ |
{ | ||
"name": "postcss-nesting", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "Transpiles nested rules according to CSS Nesting Module Level 3", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -11,19 +11,19 @@ # CSS Nesting [![Build Status][ci-img]][ci] | ||
a, b { | ||
color: red; | ||
color: red; | ||
@nest & c, & d { | ||
color: white; | ||
} | ||
@nest & c, & d { | ||
color: white; | ||
} | ||
@nest & & { | ||
color: blue; | ||
} | ||
@nest & & { | ||
color: blue; | ||
} | ||
@nest &:hover { | ||
color: black; | ||
} | ||
@nest &:hover { | ||
color: black; | ||
} | ||
@media (min-width: 30em) { | ||
color: yellow; | ||
} | ||
@media (min-width: 30em) { | ||
color: yellow; | ||
} | ||
} | ||
@@ -37,7 +37,7 @@ | ||
a c, b c, a d, b d { | ||
a c, a d, b c, b d { | ||
color: white; | ||
} | ||
a a, a b, b a, b b { | ||
a a, b b { | ||
color: blue; | ||
@@ -87,3 +87,3 @@ } | ||
postcss([ | ||
require('postcss-nesting')({ /* options */ }) | ||
require('postcss-nesting')({ /* options */ }) | ||
]); | ||
@@ -106,9 +106,9 @@ ``` | ||
gulp.task('css', function () { | ||
return gulp.src('./css/src/*.css').pipe( | ||
postcss([ | ||
require('postcss-nesting')({ /* options */ }) | ||
]) | ||
).pipe( | ||
gulp.dest('./css') | ||
); | ||
return gulp.src('./css/src/*.css').pipe( | ||
postcss([ | ||
require('postcss-nesting')({ /* options */ }) | ||
]) | ||
).pipe( | ||
gulp.dest('./css') | ||
); | ||
}); | ||
@@ -131,16 +131,15 @@ ``` | ||
grunt.initConfig({ | ||
postcss: { | ||
options: { | ||
processors: [ | ||
require('postcss-nesting')({ /* options */ }) | ||
] | ||
}, | ||
dist: { | ||
src: 'css/*.css' | ||
} | ||
} | ||
postcss: { | ||
options: { | ||
processors: [ | ||
require('postcss-nesting')({ /* options */ }) | ||
] | ||
}, | ||
dist: { | ||
src: 'css/*.css' | ||
} | ||
} | ||
}); | ||
``` | ||
## Options | ||
@@ -147,0 +146,0 @@ |
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
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
317
0
17684
163