@csstools/postcss-initial
PostCSS plugin to fallback initial keyword.
Last updated 3 months ago by romainmenke .
MIT-0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @csstools/postcss-initial 
SYNC missed versions from official npm registry.

PostCSS Initial PostCSS Logo

npm install @csstools/postcss-initial --save-dev

PostCSS Initial fallback the initial keyword following the CSS Cascade 4 Specification.

.foo {
	border: initial;
}

/* becomes */

.foo {
	border: medium none currentcolor;
	border: initial;
}

See prior work by maximkoretskiy here postcss-initial To ensure long term maintenance and to provide the needed features this plugin was recreated based on maximkoretskiy's work.

Usage

Add PostCSS Initial to your project:

npm install postcss @csstools/postcss-initial --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssInitial = require('@csstools/postcss-initial');

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

Options

preserve

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

postcssInitial({ preserve: false })
.foo {
	border: initial;
}

/* becomes */

.foo {
	border: medium none currentcolor;
}

Current Tags

  • 2.0.0                                ...           latest (3 months ago)

3 Versions

  • 2.0.0                                ...           3 months ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE