postcss-dark-and-light

1.0.1 • Public • Published

postcss-dark-and-light

PostCSS plugin for lighten and darken css based on TinyColor and on the lighten / darken algorithm on MdigiTools.

.foo {
  /* Darken */
  background: darken(#c84754, 40%);

  /* Lighten */
  background: lighten(#c84754, 40%);
}
.foo {
  /* Darken */
  background: #7d252e;

  /* Lighten */
  background: #de9198;

}

Usage

Step 1: Install plugin:

npm install --save-dev postcss postcss-dark-and-light

Step 2: 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 do not use PostCSS, add it according to official docs and set this plugin in settings.

Step 3: Add the plugin to plugins list:

module.exports = {
  plugins: [
+   require('postcss-dark-and-light'),
    require('autoprefixer')
  ]
}

Package Sidebar

Install

npm i postcss-dark-and-light

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

6.99 kB

Total Files

10

Last publish

Collaborators

  • pectorel_