1.0.0 • Published 4 years ago

postcss-colour v1.0.0

Weekly downloads
1
License
CC0-1.0
Repository
github
Last release
4 years ago

PostCSS Colour

PostCSS Colour lets you use define colours in css the way her majesty Queen Elizabeth II intended it.

Build and test architecture cloned from postcss-short-size

body {
  colour: Blue;
  background-colour: #fff;
  border-colour: rgb(25, 0, 0);
}

/* becomes */

body {
  color: Blue;
  background-color: #fff;
  border-color: rgb(25, 0, 0);
}

Usage

Add PostCSS Colour to your project:

npm install postcss postcss-colour --save-dev

Use PostCSS Colour to process your CSS:

const postcssColour = require('postcss-colour');

postcssColour.process(YOUR_CSS /*, processOptions, pluginOptions */);

Or use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssColour = require('postcss-colour');

postcss([
  postcssColour(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Colour runs in all Node environments, with special instructions for:

NodePostCSS CLIWebpackCreate React AppGulpGrunt