1.0.0 • Published 4 years ago

postcss-cull-units v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

PostCSS Cull Units

Build Status

PostCSS plugin that removes redundant units.

.foo {
    border: 1px solid #0F0103;
    margin: 0rem 5rem;
    padding: 0cm;
    width: 50vw
}
.foo {
    border: 1px solid #0F0103;
    margin: 0 5rem;
    padding: 0;
    width: 50vw
}

Usage

Check you project for existed PostCSS config: postcss.config.js in the project root, "postcss" section in package.json or postcss in bundle config.

If you already use PostCSS, add the plugin to plugins list:

module.exports = {
  plugins: [
+   require('postcss-cull-units'),
    require('autoprefixer')
  ]
}

If you do not use PostCSS, add it according to official docs and set this plugin in settings.