postcss-place
Use a place-* shorthand for align-* and justify-* in CSS
Last updated 7 years ago by jonathantneal .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install postcss-place 
SYNC missed versions from official npm registry.

PostCSS Place Properties PostCSS Logo

npm version CSS Standard Status Build Status Discord

PostCSS Place Properties lets you use place-* properties as shorthands for align-* and justify-*, following the CSS Box Alignment specification.

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

/* becomes */

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

Usage

Add PostCSS Place Properties to your project:

npm install postcss postcss-place --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssPlace = require('postcss-place');

postcss([
	postcssPlace(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Place Properties runs in all Node environments, with special instructions for:

Options

preserve

The preserve option determines whether the original notation is preserved. By default, it is preserved.

postcssPlace({ preserve: false })
.example {
	place-self: center;
	place-content: space-between center;
}

/* becomes */

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

Current Tags

  • 8.0.1                                ...           latest (2 years ago)

17 Versions

  • 8.0.1                                ...           2 years ago
  • 8.0.0                                ...           2 years ago
  • 7.0.5                                ...           2 years ago
  • 7.0.4                                ...           3 years ago
  • 7.0.3                                ...           3 years ago
  • 7.0.2                                ...           3 years ago
  • 7.0.1                                ...           3 years ago
  • 7.0.0                                ...           3 years ago
  • 5.0.0                                ...           5 years ago
  • 4.0.1                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 3.0.1                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (9)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |