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

postcss-structure

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-structure - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

20

lib/index.js

@@ -59,2 +59,4 @@ 'use strict';

e.customStyles[mediaAtRule.params].push(rule);
_utils2.default.nodeClean(rule);
});

@@ -69,7 +71,7 @@ });

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'row') {
e.rows.push(decl.parent.selector);
_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'bloc') {

@@ -84,3 +86,3 @@ var i = value[1].split('-');

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'fraction') {

@@ -93,3 +95,3 @@ var _i = value[1].split('/');

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'blob') {

@@ -102,3 +104,3 @@ var _i2 = value[1].replace('/', '-').split('-');

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'columns') {

@@ -113,3 +115,3 @@ var _i3 = value[1].split('-');

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'show') {

@@ -119,3 +121,3 @@ e.shows[value[1]] = e.shows[value[1]] || [];

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'hide') {

@@ -125,3 +127,3 @@ e.hides[value[1]] = e.hides[value[1]] || [];

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
} else if (value[0] === 'right') {

@@ -131,3 +133,3 @@ e.rights[value[1]] = e.rights[value[1]] || [];

_utils2.default.declClean(decl);
_utils2.default.nodeClean(decl);
}

@@ -134,0 +136,0 @@ }

@@ -25,7 +25,7 @@ "use strict";

},
declClean: function declClean(decl) {
if (decl.parent.nodes.length === 1) {
decl.parent.remove();
nodeClean: function nodeClean(node) {
if (node.parent.nodes.length === 1) {
node.parent.remove();
} else {
decl.remove();
node.remove();
}

@@ -32,0 +32,0 @@ }

{
"name": "postcss-structure",
"version": "0.8.0",
"version": "0.8.1",
"description": "A PostCSS plugin to create CSS grids based on a fixed block width.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -73,147 +73,69 @@ const tests = {

output: `.container {
padding-left: 1.5rem;
padding-right: 1.5rem;
overflow: hidden;
margin-left: auto;
margin-right: auto;
padding-left: 1.5rem;
padding-right: 1.5rem;
overflow: hidden;
margin-left: auto;
margin-right: auto
}
.custom-1 {
background-color: plum;
background-color: plum
}
.custom-2 {
background-color: plum;
color: white;
background-color: plum;
color: white
}
@media (min-width: 43.5rem) {
.container {
width: 42.5rem;
}
.custom-1 {
background-color: deeppink;
}
.custom-2 {
background-color: deeppink;
color: silver;
}
.container {
width: 42.5rem
}
.custom-1 {
background-color: deeppink
}
.custom-2 {
background-color: deeppink;
color: silver
}
}
@media (min-width: 64rem) {
.container {
width: 63rem;
}
.custom-1 {
background-color: orangered;
}
.container {
width: 63rem
}
.custom-1 {
background-color: orangered
}
}
@media (min-width: 84.5rem) {
.container {
width: 83.5rem;
}
.custom-1 {
background-color: dodgerblue;
}
.container {
width: 83.5rem
}
.custom-1 {
background-color: dodgerblue
}
}
@media (min-width: 105rem) {
.container {
width: 104rem;
}
.custom-1 {
background-color: lightcoral;
}
.container {
width: 104rem
}
.custom-1 {
background-color: lightcoral
}
}
@media (min-width: 125.5rem) {
.container {
width: 124.5rem;
}
.custom-1 {
background-color: gold;
}
.container {
width: 124.5rem
}
.custom-1 {
background-color: gold
}
}
@media (min-width: 146rem) {
.container {
width: 145rem;
}
.container {
width: 145rem
}
}
@media (min-width: 166.5rem) {
.container {
width: 165.5rem;
}
.container {
width: 165.5rem
}
}
@structure-media 0 {
.custom-1 {
background-color: plum;
}
}
@structure-media 1 {
.custom-1 {
background-color: palegreen;
}
}
@structure-media 2 {
.custom-1 {
background-color: deeppink;
}
}
@structure-media 3 {
.custom-1 {
background-color: orangered;
}
}
@structure-media 4 {
.custom-1 {
background-color: dodgerblue;
}
}
@structure-media 5 {
.custom-1 {
background-color: lightcoral;
}
}
@structure-media 6 {
.custom-1 {
background-color: gold;
}
}
@structure-media 0 {
.custom-2 {
background-color: plum;
color: white;
}
}
@structure-media 2 {
.custom-2 {
background-color: deeppink;
color: silver;
}
}
`,

@@ -220,0 +142,0 @@ };

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