2.0.2 • Published 9 years ago

postcss-rgb-plz v2.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

postcss-rgb-plz npm version

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.