postcss-rgb-plz
v2.0.2
Published
PostCSS plugin to convert hex colors to rgb
Downloads
14
Maintainers
Readme
postcss-rgb-plz
PostCSS plugin to convert hex colors to rgb.
.foo {
color: #333;
box-shadow: 2px 2px 4px #f1f1f1;
}
.foo {
color: rgb( 51, 51, 51 );
box-shadow: 2px 2px 4px rgb( 241, 241, 241 );
}
Install
npm i --save-dev postcss-rgb-plz
Usage
postcss([ require('postcss-rgb-plz') ])
See PostCSS docs for examples for your environment.
Reasoning
Part of the CSS styleguide at my work is to always use rgb values for color, and sometimes I like to use hexes/my preprocessor will convert to hexes. This solves that issue.