0.4.2 • Published 1 year ago

postcss-sayonara v0.4.2

Weekly downloads
19
License
MIT
Repository
github
Last release
1 year ago

PostCSS Sayonara

PostCSS plugin to limit used declarations to a given set.

version node-current npm licence Snyk Vulnerabilities for npm package

.foo {
  /* Input example */
  fill: #fff;
  cursor: pointer;
}
.foo {
  /* Output example */
  fill: #fff;
}

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-sayonara')({
+     allowedPropNames: [
+       'stroke', 'stroke-width', 'stroke-opacity', 'stroke-dasharray',
+       'stroke-dashoffset', 'stroke-linecap',
+       'stroke-linejoin', 'stroke-miterlimit',
+       'fill', 'fill-rule', 'fill-opacity',
+       'clip-path', 'mask',
+       'opacity', 'color', 'stop-color', 'stop-opacity',
+       'font-family', 'font-size', 'font-weight',
+       'text-anchor', 'visibility', 'display',
+     ],
+   }),
    require('autoprefixer'),
  ],
}

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

0.4.2

1 year ago

0.4.1-n

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

4 years ago