2.1.0 • Published 8 years ago
postcss-plugin-initial v2.1.0
PostCSS Plugin Initial
PostCSS plugin to fallback initial keyword.
Installation
yarn add postcss-plugin-initial # or npm install postcss-plugin-initialExample
a {
animation: initial;
background: initial;
white-space: initial;
}
p {
background: url(/img1.png), url(/img2.png);
background-repeat: initial no-repeat;
}a {
animation: none 0s ease 0s 1 normal none running;
animation: initial;
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
background: initial;
white-space: normal;
white-space: initial;
}
p {
background: url(/img1.png), url(/img2.png);
background-repeat: repeat no-repeat;
}Options
replace
Takes boolean.
Replace the initial with the fallback instead of adding it.
Default value: false.
skipSupports
Takes boolean.
Doesn't change initial values when used within an @supports ruleset and the supports check includes the initial keyword:
@supports (display: initial) {
.class {
/* Skipped if `skipSupports` is true */
background-color: initial;
}
}Default value: true.
Usage
postcss([
require('postcss-plugin-initial')({
replace: true,
}),
])