postcss-color-rgba-fallback
PostCSS plugin to transform rgba() to hexadecimal.
Installation
$ npm install postcss-color-rgba-fallback
Usage
// dependenciesvar fs = var postcss = var colorRgbaFallback = // css to be processedvar css = fs // process cssvar output = css
Using this input.css
:
you will get:
Node.js options
postcss-color-rgba-fallback accepts options
properties
default: [ "background-color", "background", "color", "border", "border-color", "outline", "outline-color ]
Allows you to specify your whitelist of properties. This option enables adding a fallback for one or a properties list
oldie
default: false
Set to true to enable the option and to get fallback for ie8
backgroundColor
default: null
Allows you to specify a background color to use as a base alpha matte.
Instead of cutting off the alpha channel it will blend the foreground and background.
Expects an array of rgb values:
"backgroundColor": 255 1 1
Checkout tests for more examples.
Contributing
Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
$ git clone https://github.com/postcss/postcss-color-rgba-fallback.git
$ git checkout -b patch-1
$ npm install
$ npm test