Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.27 KB

File metadata and controls

52 lines (37 loc) · 1.27 KB

PostCSS Color Rgb Build Status

PostCSS plugin to transform new RGB functions syntaxes to compatible CSS.

Find more information about these changes in "CSS Function Syntaxes (color and otherwise)" by Tab Atkins Jr.

.foo {
  color: rgb(255 0 0);
}

.bar {
  color: rgb(255 0 0 / 40%);
}

.baz {
  color: rgba(255, 0, 0, 40%);
}
.foo {
  color: rgb(255, 0, 0);
}

.bar {
  color: rgba(255, 0, 0, 0.4);
}

.baz {
  color: rgba(255, 0, 0, 0.4);
}

Checkout tests for more examples.

Installation

I am not able to release this code to npm because this plugin already exists and I don't want to name it postcss-color-rgb2 😒 But I couldn't remove or close this repository as long as the "official" plugin does not handle correctly complex cases #1.

Usage

postcss([ require('postcss-color-rgb') ])

See PostCSS docs for examples for your environment.