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

postcss-place

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-place - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

CHANGELOG.md
# Changes to PostCSS Place Properties
### 3.0.0 (May 8, 2018)
### 3.0.1 (May 8, 2018)
- Updated: `postcss-selector-parser` to v4.0.0 (major)
- Updated: `postcss-values-parser` to v1.5.0 (major)
- Updated: `postcss` to v6.0.22 (patch)

@@ -7,0 +7,0 @@

@@ -6,3 +6,3 @@ 'use strict';

var postcss = _interopDefault(require('postcss'));
var parser = _interopDefault(require('postcss-value-parser'));
var parser = _interopDefault(require('postcss-values-parser'));

@@ -21,13 +21,9 @@ var placeMatch = /^place-(content|items|self)/;

// value
var value = parser(decl.value);
// value ast and child nodes
var value = parser(decl.value).parse();
var children = value.nodes[0].nodes;
// divider position
var index = value.nodes.map(function (node) {
return node.type;
}).indexOf('space');
// new justify-[alignment] and align-[alignment] declarations
var alignValue = index === -1 ? decl.value : parser.stringify(value.nodes.slice(0, index));
var justifyValue = index === -1 ? decl.value : parser.stringify(value.nodes.slice(index + 1));
var alignValue = children.length === 1 ? decl.value : String(children.slice(0, 1)).trim();
var justifyValue = children.length === 1 ? decl.value : String(children.slice(1)).trim();

@@ -34,0 +30,0 @@ decl.cloneBefore({

import postcss from 'postcss';
import parser from 'postcss-value-parser';
import parser from 'postcss-values-parser';

@@ -16,13 +16,9 @@ var placeMatch = /^place-(content|items|self)/;

// value
var value = parser(decl.value);
// value ast and child nodes
var value = parser(decl.value).parse();
var children = value.nodes[0].nodes;
// divider position
var index = value.nodes.map(function (node) {
return node.type;
}).indexOf('space');
// new justify-[alignment] and align-[alignment] declarations
var alignValue = index === -1 ? decl.value : parser.stringify(value.nodes.slice(0, index));
var justifyValue = index === -1 ? decl.value : parser.stringify(value.nodes.slice(index + 1));
var alignValue = children.length === 1 ? decl.value : String(children.slice(0, 1)).trim();
var justifyValue = children.length === 1 ? decl.value : String(children.slice(1)).trim();

@@ -29,0 +25,0 @@ decl.cloneBefore({

{
"name": "postcss-place",
"version": "3.0.0",
"version": "3.0.1",
"description": "Use a place-* shorthand for align-* and justify-* in CSS",

@@ -29,3 +29,3 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>",

"postcss": "^6.0.22",
"postcss-value-parser": "^3.3.0"
"postcss-values-parser": "^1.5.0"
},

@@ -32,0 +32,0 @@ "devDependencies": {

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