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

postcss-utilities

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-utilities - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

5

CHANGELOG.md
# Change Log
# v0.4.0
- Change `append` to `replaceWith` method (keep the same atRule position for new declarations)
- Fix description and author in `package.json`
# v0.3.0

@@ -4,0 +9,0 @@

6

lib/aspect-ratio.js

@@ -5,8 +5,6 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var width = args[1] || 16;
var height = args[2] || 9;
parentDecl.append({
decl.replaceWith({
prop: 'position',

@@ -36,4 +34,2 @@ value: 'relative',

});
decl.remove();
};

@@ -5,7 +5,5 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var radius = args[1] || '3px';
parentDecl.append({
decl.replaceWith({
prop: 'border-bottom-left-radius',

@@ -19,4 +17,2 @@ value: radius,

});
decl.remove();
};

@@ -7,9 +7,8 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
args.shift();
var decls = directionalValues('border', 'color', args);
var aux = decl;
decls.forEach( function (i) {
parentDecl.append({
aux.append({
prop: i.prop,

@@ -21,3 +20,3 @@ value: i.value,

decl.remove();
decl.replaceWith(aux.nodes);
};

@@ -5,7 +5,5 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var radius = args[1] || '3px';
parentDecl.append({
decl.replaceWith({
prop: 'border-bottom-left-radius',

@@ -19,4 +17,2 @@ value: radius,

});
decl.remove();
};

@@ -5,7 +5,5 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var radius = args[1] || '3px';
parentDecl.append({
decl.replaceWith({
prop: 'border-bottom-right-radius',

@@ -19,4 +17,2 @@ value: radius,

});
decl.remove();
};

@@ -7,9 +7,8 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
args.shift();
var decls = directionalValues('border', 'style', args);
var aux = decl;
decls.forEach( function (i) {
parentDecl.append({
aux.append({
prop: i.prop,

@@ -21,3 +20,3 @@ value: i.value,

decl.remove();
decl.replaceWith(aux.nodes);
};

@@ -5,7 +5,5 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var radius = args[1] || '3px';
parentDecl.append({
decl.replaceWith({
prop: 'border-top-left-radius',

@@ -19,4 +17,2 @@ value: radius,

});
decl.remove();
};

@@ -7,9 +7,8 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
args.shift();
var decls = directionalValues('border', 'width', args);
var aux = decl;
decls.forEach( function (i) {
parentDecl.append({
aux.append({
prop: i.prop,

@@ -21,3 +20,3 @@ value: i.value,

decl.remove();
decl.replaceWith(aux.nodes);
};

@@ -5,5 +5,3 @@ /**

module.exports = function (decl) {
var parentDecl = decl.parent;
parentDecl.append({
decl.replaceWith({
prop: 'display',

@@ -21,4 +19,2 @@ value: 'block',

});
decl.remove();
};

@@ -5,5 +5,3 @@ /**

module.exports = function (decl) {
var parentDecl = decl.parent;
parentDecl.append({
decl.replaceWith({
prop: 'position',

@@ -25,4 +23,2 @@ value: 'absolute',

});
decl.remove();
};

@@ -5,4 +5,2 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var color = '#000';

@@ -18,3 +16,3 @@ var size = '100px';

parentDecl.append({
decl.replaceWith({
prop: 'border-radius',

@@ -36,4 +34,2 @@ value: '50%',

});
decl.remove();
};

@@ -5,5 +5,3 @@ /**

module.exports = function (decl) {
var parentDecl = decl.parent;
parentDecl.append({
decl.replaceWith({
prop: 'border',

@@ -44,4 +42,2 @@ value: 0,

});
decl.remove();
};

@@ -5,4 +5,2 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var color = '#cecece';

@@ -19,3 +17,3 @@ var verticalMargin = '3em';

parentDecl.append({
decl.replaceWith({
prop: 'height',

@@ -37,4 +35,2 @@ value: height,

});
decl.remove();
};

@@ -7,9 +7,8 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
args.shift();
var decls = directionalValues('margin', '', args);
var aux = decl;
decls.forEach( function (i) {
parentDecl.append({
aux.append({
prop: i.prop,

@@ -21,3 +20,3 @@ value: i.value,

decl.remove();
decl.replaceWith(aux.nodes);
};

@@ -7,9 +7,8 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
args.shift();
var decls = directionalValues('padding', '', args);
var aux = decl;
decls.forEach( function (i) {
parentDecl.append({
aux.append({
prop: i.prop,

@@ -21,3 +20,3 @@ value: i.value,

decl.remove();
decl.replaceWith(aux.nodes);
};

@@ -7,4 +7,2 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var position = args[1];

@@ -18,4 +16,6 @@

var aux = decl;
decls.forEach( function (i) {
parentDecl.append({
aux.append({
prop: i.prop,

@@ -27,3 +27,3 @@ value: i.value,

decl.remove();
decl.replaceWith(aux.nodes);
};

@@ -25,3 +25,3 @@ /**

parentDecl.append({
decl.replaceWith({
prop: 'margin-top',

@@ -39,4 +39,2 @@ value: 0,

});
decl.remove();
};

@@ -5,8 +5,6 @@ /**

module.exports = function (decl) {
var parentDecl = decl.parent;
var fontFamily = 'sans-serif';
var lineHeight = '1.5';
parentDecl.append({
decl.replaceWith({
prop: 'font-family',

@@ -72,4 +70,2 @@ value: fontFamily,

});
decl.remove();
};

@@ -5,4 +5,2 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var width;

@@ -21,3 +19,3 @@ var height;

parentDecl.append({
decl.replaceWith({
prop: 'width',

@@ -31,4 +29,2 @@ value: width,

});
decl.remove();
};

@@ -5,6 +5,4 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
if (args[1] === '2') {
parentDecl.append({
decl.replaceWith({
prop: 'overflow',

@@ -23,3 +21,3 @@ value: 'hidden',

} else {
parentDecl.append({
decl.replaceWith({
prop: 'font',

@@ -46,4 +44,2 @@ value: '0/0 a',

}
decl.remove();
};

@@ -5,4 +5,2 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var color = '#000';

@@ -53,3 +51,5 @@ var size = '20px';

parentDecl.append({
var aux = decl;
aux.append({
prop: 'height',

@@ -65,3 +65,3 @@ value: 0,

if (border[0] === true) { // top
parentDecl.append({
aux.append({
prop: 'border-top',

@@ -74,3 +74,3 @@ value: size + ' solid ' + color,

if (border[1] === true) { // right
parentDecl.append({
aux.append({
prop: 'border-right',

@@ -83,3 +83,3 @@ value: size + ' solid ' + color,

if (border[2] === true) { // bottom
parentDecl.append({
aux.append({
prop: 'border-bottom',

@@ -92,3 +92,3 @@ value: size + ' solid ' + color,

if (border[3] === true) { // left
parentDecl.append({
aux.append({
prop: 'border-left',

@@ -102,3 +102,3 @@ value: size + ' solid ' + color,

if (border[0] === 't') { // top
parentDecl.append({
aux.append({
prop: 'border-top',

@@ -111,3 +111,3 @@ value: size + ' solid transparent',

if (border[1] === 't') { // right
parentDecl.append({
aux.append({
prop: 'border-right',

@@ -120,3 +120,3 @@ value: size + ' solid transparent',

if (border[2] === 't') { // bottom
parentDecl.append({
aux.append({
prop: 'border-bottom',

@@ -129,3 +129,3 @@ value: size + ' solid transparent',

if (border[3] === 't') { // left
parentDecl.append({
aux.append({
prop: 'border-left',

@@ -137,3 +137,3 @@ value: size + ' solid transparent',

decl.remove();
decl.replaceWith(aux.nodes);
};

@@ -5,4 +5,2 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var lineHeight = 1;

@@ -26,3 +24,3 @@ var textOverflow = 'ellipsis';

parentDecl.append({
decl.replaceWith({
prop: 'display',

@@ -60,4 +58,2 @@ value: 'block',

});
decl.remove();
};

@@ -5,7 +5,5 @@ /**

module.exports = function (decl) {
var parentDecl = decl.parent;
var textOverflow = 'ellipsis';
parentDecl.append({
decl.replaceWith({
prop: 'white-space',

@@ -23,4 +21,2 @@ value: 'nowrap',

});
decl.remove();
};

@@ -5,4 +5,2 @@ /**

module.exports = function (decl, args) {
var parentDecl = decl.parent;
var wrap = 'break-word';

@@ -19,3 +17,3 @@ var wordBreak = 'break-all';

parentDecl.append({
decl.replaceWith({
prop: 'overflow-wrap',

@@ -33,4 +31,2 @@ value: wrap,

});
decl.remove();
};
{
"name": "postcss-utilities",
"version": "0.3.0",
"description": "PostCSS plugin to add a collection of mixins, shortcuts, helpers and tools for yout CSS",
"version": "0.4.0",
"description": "PostCSS plugin to add a collection of mixins, shortcuts, helpers and tools for your CSS",
"keywords": [

@@ -18,3 +18,3 @@ "postcss",

],
"author": "ismamz <ismael@isma.uy>",
"author": "Ismael Martínez <ismael@isma.uy>",
"license": "MIT",

@@ -21,0 +21,0 @@ "repository": "ismamz/postcss-utilities",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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