Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-nested

Package Overview
Dependencies
Maintainers
1
Versions
39
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.0 to 0.2.1

3

ChangeLog.md

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

## 0.2.1
* Add comma support to selectors unwrap.
## 0.2

@@ -2,0 +5,0 @@ * Use PostCSS 4.0.

20

index.js

@@ -0,7 +1,17 @@

var list = require('postcss/lib/list');
var selector = function (parent, node) {
if ( node.selector.indexOf('&') == -1 ) {
return parent.selector + ' ' + node.selector;
} else {
return node.selector.replace(/&/g, parent.selector);
}
return list.comma(parent.selector)
.map(function (i) {
return list.comma(node.selector)
.map(function (j) {
if ( j.indexOf('&') == -1 ) {
return i + ' ' + j;
} else {
return j.replace(/&/g, i);
}
})
.join(', ');
})
.join(', ');
};

@@ -8,0 +18,0 @@

{
"name": "postcss-nested",
"version": "0.2.0",
"description": "PostCSS plugin to unwrap nested rules like it Sass does",
"version": "0.2.1",
"description": "PostCSS plugin to unwrap nested rules like how Sass does it.",
"keywords": ["postcss", "sass", "css", "nested"],

@@ -17,5 +17,5 @@ "author": "Andrey Sitnik <andrey@sitnik.ru>",

"jshint-stylish": "1.0.0",
"gulp-jshint": "1.9.0",
"gulp-jshint": "1.9.1",
"gulp-mocha": "2.0.0",
"postcss": "4.0.0",
"postcss": "4.0.3",
"mocha": "2.1.0",

@@ -22,0 +22,0 @@ "chai": "1.10.0",

@@ -6,3 +6,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 it Sass does.
like how Sass does it.

@@ -9,0 +9,0 @@ ```css

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