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

postcss-nesting

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-nesting - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

.editorconfig

7

CHANGELOG.md

@@ -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

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