Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hamlim/postcss-plugin-initial
PostCSS plugin to fallback initial keyword
https://github.com/hamlim/postcss-plugin-initial
css postcss postcss-plugins
Last synced: 18 days ago
JSON representation
PostCSS plugin to fallback initial keyword
- Host: GitHub
- URL: https://github.com/hamlim/postcss-plugin-initial
- Owner: hamlim
- Created: 2018-01-22T21:51:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-24T02:58:29.000Z (almost 7 years ago)
- Last Synced: 2024-10-12T20:19:34.550Z (about 1 month ago)
- Topics: css, postcss, postcss-plugins
- Language: JavaScript
- Homepage:
- Size: 104 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# PostCSS Plugin Initial
PostCSS plugin to fallback `initial` keyword.
## Installation
```
yarn add postcss-plugin-initial # or npm install postcss-plugin-initial
```## Example
```css
a {
animation: initial;
background: initial;
white-space: initial;
}
p {
background: url(/img1.png), url(/img2.png);
background-repeat: initial no-repeat;
}
``````css
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:```css
@supports (display: initial) {
.class {
/* Skipped if `skipSupports` is true */
background-color: initial;
}
}
```Default value: `true`.
## Usage
```js
postcss([
require('postcss-plugin-initial')({
replace: true,
}),
])
```## [Changelog](./CHANGELOG.md)