Skip to content

himynameisdave/postcss-rgb-plz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

PostCSS plugin to convert hex colors to rgb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published