PostCSS plugin delete duplicate css in the file
npm install postcss-delete-duplicate-cssREADME-cn.md
css
.foo {
width: 100px;
height: 100px;
}
.foo{
height: 100px;
width: 100px;
}
`
And get this:
`css
.foo {
width: 100px;
height: 100px;
}
`
Installation
$ npm install postcss-delete-duplicate-css
Usage
`JS
postcss([ require('postcss-delete-duplicate-css') ])
`
See PostCSS docs for examples regarding usage.
Options
$3
- Type: boolean
- Default: false
Whether to delete empty styles
Write this:
` css
.foo {
width: 100px;
}
div {}
`
And get this:
`css
.foo{
width: 100px
}
`
$3
- Type: boolean
- Default: false
Whether to delete all comments
Write this:
`css
/This is the comment/
div {
width: 100px;
height: 100px;
}
`
And get this:
`css
div {
width: 100px;
height: 100px
}
`
Testing
Tests can be run via the following command:
$ npm run test`