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

`place-[alignment] shorthand for align-[alignment] and justify-[alignment]

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.6M
increased by5.77%
Maintainers
1
Weekly downloads
 
Created
Source

Place PostCSS Logo

NPM Version Build Status Licensing Changelog Gitter Chat

Place lets you use place-* properties as shorthands for align-* and justify-* per the CSS Box Alignment Module Level 3.

/* before */

.example {
	place-self: center;
	place-content: space-between center;
}

/* after */

.example {
	align-self: center;
	justify-self: center;
	align-content: space-between;
	justify-content: center;
}

Usage

Add Place to your build tool:

npm install jonathantneal/postcss-place --save-dev
Node
require('postcss-place').process(YOUR_CSS, { /* options */ });
PostCSS

Add PostCSS to your build tool:

npm install postcss --save-dev

Load Place as a PostCSS plugin:

postcss([
	require('postcss-place')({ /* options */ })
]).process(YOUR_CSS, /* options */);
Gulp

Add Gulp PostCSS to your build tool:

npm install gulp-postcss --save-dev

Enable Place within your Gulpfile:

var postcss = require('gulp-postcss');

gulp.task('css', function () {
	return gulp.src('./src/*.css').pipe(
		postcss([
			require('postcss-place')({ /* options */ })
		])
	).pipe(
		gulp.dest('.')
	);
});
Grunt

Add Grunt PostCSS to your build tool:

npm install grunt-postcss --save-dev

Enable Place within your Gruntfile:

grunt.loadNpmTasks('grunt-postcss');

grunt.initConfig({
	postcss: {
		options: {
			use: [
				require('postcss-place')({ /* options */ })
			]
		},
		dist: {
			src: '*.css'
		}
	}
});

Options

prefix

Type: String
Default: null

Specifies a prefix to be surrounded by dashes before the declaration (e.g. prefix: 'x' changes the detected property to -x-place-content).

Keywords

FAQs

Package last updated on 26 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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