Socket
Socket
Sign inDemoInstall

postcss-nested

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-nested - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

3

ChangeLog.md

@@ -0,1 +1,4 @@

## 0.2.2
* Module returns function to have common PostCSS API.
## 0.2.1

@@ -2,0 +5,0 @@ * Add comma support to selectors unwrap.

@@ -65,2 +65,6 @@ var list = require('postcss/lib/list');

module.exports = { postcss: process };
module.exports = function () {
return process;
};
module.exports.postcss = process;

4

package.json
{
"name": "postcss-nested",
"version": "0.2.1",
"version": "0.2.2",
"description": "PostCSS plugin to unwrap nested rules like how Sass does it.",

@@ -17,3 +17,3 @@ "keywords": ["postcss", "sass", "css", "nested"],

"jshint-stylish": "1.0.0",
"gulp-jshint": "1.9.1",
"gulp-jshint": "1.9.2",
"gulp-mocha": "2.0.0",

@@ -20,0 +20,0 @@ "postcss": "4.0.3",

@@ -5,4 +5,3 @@ # PostCSS Nested [![Build Status](https://travis-ci.org/postcss/postcss-nested.svg)](https://travis-ci.org/postcss/postcss-nested)

[PostCSS](https://github.com/postcss/postcss) plugin to unwrap nested rules
like how Sass does it.
[PostCSS] plugin to unwrap nested rules like how Sass does it.

@@ -16,6 +15,6 @@ ```css

}
body.is_dark & {
color: white;
}
}
body.is_dark &_title {
color: white;
}
img {

@@ -38,3 +37,3 @@ display: block;

}
body.is_dark phone_title {
body.is_dark .phone_title {
color: white;

@@ -51,43 +50,10 @@ }

[PostCSS]: https://github.com/postcss/postcss
## Usage
See [PostCSS](https://github.com/postcss/postcss) docs for source map options
and other special cases.
### Grunt
```js
grunt.initConfig({
postcss: {
options: {
processors: [ require('postcss-nested').postcss ]
},
dist: {
src: 'css/*.css'
}
}
});
grunt.loadNpmTasks('grunt-postcss');
postcss([ require('postcss-nested') ])
```
### Gulp
```js
var postcss = require('gulp-postcss');
gulp.task('css', function () {
return gulp.src('./src/*.css')
.pipe(postcss([ require('postcss-nested') ]))
.pipe(gulp.dest('./dest'));
});
```
### Node
```js
var postcss = require('postcss');
var nested = require('postcss-nested');
var processed = postcss(nested).process(css).css;
```
See [PostCSS] docs for examples for your environment.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc